class MutexLock
Defined at line 605 of file ../../third_party/abseil-cpp/src/absl/synchronization/mutex.h
MutexLock
`MutexLock` is a helper class, which acquires and releases a `Mutex` via
RAII.
Example:
Class Foo {
public:
Foo::Bar* Baz() {
MutexLock lock(mu_);
...
return bar;
}
private:
Mutex mu_;
};
Public Methods
void MutexLock (Mutex & mu)
Calls `mu.lock()` and returns when that call returns. That is, `mu` is
guaranteed to be locked when this object is constructed.
Defined at line 611 of file ../../third_party/abseil-cpp/src/absl/synchronization/mutex.h
void MutexLock (Mutex * _Nonnull mu)
Calls `mu->lock()` and returns when that call returns. That is, `*mu` is
guaranteed to be locked when this object is constructed. Requires that
`mu` be dereferenceable.
Defined at line 620 of file ../../third_party/abseil-cpp/src/absl/synchronization/mutex.h
void MutexLock (Mutex & mu, const Condition & cond)
Like above, but calls `mu.LockWhen(cond)` instead. That is, in addition to
the above, the condition given by `cond` is also guaranteed to hold when
this object is constructed.
Defined at line 628 of file ../../third_party/abseil-cpp/src/absl/synchronization/mutex.h
void MutexLock (Mutex * _Nonnull mu, const Condition & cond)
Defined at line 634 of file ../../third_party/abseil-cpp/src/absl/synchronization/mutex.h
void MutexLock (const MutexLock & )
Defined at line 640 of file ../../third_party/abseil-cpp/src/absl/synchronization/mutex.h
void MutexLock (MutexLock && )
Defined at line 641 of file ../../third_party/abseil-cpp/src/absl/synchronization/mutex.h
MutexLock & operator= (const MutexLock & )
Defined at line 642 of file ../../third_party/abseil-cpp/src/absl/synchronization/mutex.h
MutexLock & operator= (MutexLock && )
Defined at line 643 of file ../../third_party/abseil-cpp/src/absl/synchronization/mutex.h
void ~MutexLock ()
Defined at line 645 of file ../../third_party/abseil-cpp/src/absl/synchronization/mutex.h