Template:cpp/thread/future/wait for

Waits for the result to become available. Blocks until specified has elapsed or the result becomes available, whichever comes first. The return value identifies the state of the result.

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

This function may block for longer than due to scheduling or resource contention delays.

The standard recommends that a steady clock is used to measure the duration. If an implementation uses a system clock instead, the wait time may also be sensitive to clock adjustments.

The behavior is undefined if is  before the call to this function.

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)