Returns when cond is true or the deadline has passed. Returns true iff cond holds when returning.
Declared in <absl/time/clock_interface.h>
virtual
bool
AwaitWithDeadline(
absl::Mutex* mu,
absl::Condition const& cond,
absl::Time deadline) = 0;
Requires *mu to be held at least in shared mode. It will be held when evaluating cond, and upon return, but it may be released and reacquired in the meantime.
This method is similar to mu->AwaitWithDeadline() except that the latter only works with real-time deadlines. This call works properly with simulated time if invoked on a simulated clock.
true iff cond holds when returning.
| Name | Description |
|---|---|
| mu | The mutex guarding cond, held at least in shared mode. |
| cond | The condition to wait on. |
| deadline | The time by which to stop waiting. |