absl::CondVar::WaitWithTimeout

Atomically releases mu and blocks until signaled or the timeout expires, then reacquires it.

Synopsis

Declared in <absl/synchronization/mutex.h>

bool
WaitWithTimeout(
    Mutex* mu,
    absl::Duration timeout);

Return Value

true if the timeout expired without this CondVar being signaled.

Parameters

NameDescription
muThe mutex held by the calling thread.
timeoutThe maximum time to wait.