class MutexLock

Defined at line 576 of file ../../third_party/abseil-cpp/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. Requires that

`mu` be dereferenceable.

Defined at line 583 of file ../../third_party/abseil-cpp/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 590 of file ../../third_party/abseil-cpp/absl/synchronization/mutex.h

void MutexLock (const MutexLock & )

Defined at line 596 of file ../../third_party/abseil-cpp/absl/synchronization/mutex.h

void MutexLock (MutexLock && )

Defined at line 597 of file ../../third_party/abseil-cpp/absl/synchronization/mutex.h

MutexLock & operator= (const MutexLock & )

Defined at line 598 of file ../../third_party/abseil-cpp/absl/synchronization/mutex.h

MutexLock & operator= (MutexLock && )

Defined at line 599 of file ../../third_party/abseil-cpp/absl/synchronization/mutex.h

void ~MutexLock ()

Defined at line 601 of file ../../third_party/abseil-cpp/absl/synchronization/mutex.h