Template:cpp/thread/future/wait until

waits for a result to become available. It blocks until specified has been reached or the result becomes available, whichever comes first. The return value indicates why returned.

If the future is the result of a call to cpp/thread/async that used lazy evaluation, this function returns immediately without waiting.

The behavior is undefined if valid is before the call to this function, or  does not meet the  requirements.

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