absl::MutexLockMaybe::MutexLockMaybe

Acquires mu exclusively once cond holds if it is non-null.

Synopsis

Declared in <absl/synchronization/mutex.h>

explicit
MutexLockMaybe(
    Mutex* mu,
    Condition const& cond);

Parameters

NameDescription
muThe mutex to lock, or null for a no-op.
condThe condition to wait for before locking.