std::shared_future::wait_for

std::shared_future::wait_for

template< class Rep, class Period >
std::future_status wait_for( const std::chrono::duration<Rep,Period>& timeout_duration ) const;
(since C++11)

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.

A steady clock is used to measure the duration. This function may block for longer than timeout_duration due to scheduling or resource contention delays.

The behavior is undefined if valid()== f