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

Synopsis

Declared in <absl/synchronization/mutex.h>

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

Return Value

true if cond is true on return.

Parameters

Name

Description

cond

The condition to wait for.

timeout

The maximum time to wait.

Created with MrDocs