Template:cpp/thread/condition variable/wait until

causes the current thread to block until the condition variable is notified, a specific time is reached, or a spurious wakeup occurs, optionally looping until some predicate is satisfied.

@1@ Atomically releases, blocks the current executing thread, and adds it to the list of threads waiting on. The thread will be unblocked when notify_all or notify_one is executed, or when the absolute time point is reached. It may also be unblocked spuriously. When unblocked, regardless of the reason, is reacquired and  exits.

@2@ Equivalent to

@@This overload may be used to ignore spurious wakeups.

If these functions fail to meet the postcondition, std is called. For example, this could happen if relocking the mutex throws an exception.

must meet the requirements.

Return value
@1@ std if the absolute timeout specified by was reached, std otherwise.

@2@ if the predicate  still evaluates to  after the  timeout expired, otherwise. If the timeout had already expired, evaluates and returns the result of.

Exceptions
@1@ Any exception thrown by clock, time point, or duration during the execution (clocks, time points, and durations provided by the standard library never throw)

@2@ Same as but may also propagate exceptions thrown by