absl::Mutex::ReaderLockWhenWithTimeout

Blocks until cond is true or the timeout expires, then atomically acquires this Mutex in shared mode.

Synopsis

Declared in <absl/synchronization/mutex.h>

bool
ReaderLockWhenWithTimeout(
    Condition const& cond,
    absl::Duration timeout);

Return Value

true if cond is true on return.

Parameters

NameDescription
condThe condition to wait for.
timeoutThe maximum time to wait.