std::future::wait
From cppreference.com
template< class Rep, class Period > std::future_status wait_for( const std::chrono::duration<Rep,Period>& timeout_duration ); |
||
Waits for the result to become available. Blocks until specified timeout_duration has elapsed or the result becomes available, whichever comes first. Returns value identifies the state of the result. May block for longer than timeout_duration.
Contents |
[edit] Parameters
timeout_duration | - | maximum duration to block for |
[edit] Return value
Constant | Explanation |
---|---|
future_status::deferred | The function to calculate the result has not been started yet |
future_status::ready | The result is ready |
future_status::timeout | The timeout has expired |
[edit] Exceptions
(none)
[edit] Example
This section is incomplete Reason: no example |
[edit] See also
waits for the result to become available (public member function) | |
waits for the result, returns if it is not available until specified time point has been reached (public member function) |