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

Name

Description

mu

The mutex held by the calling thread.

timeout

The maximum time to wait.

Created with MrDocs