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

Name

Description

mu

The mutex to lock, or null for a no‐op.

cond

The condition to wait for before locking.

Created with MrDocs