shared_future::wait_for Method

Blocks the current thread until the associated asynchronous state is ready or until a specified time has elapsed.

template<class Rep, class Period>
   future_status wait_for(
      const chrono::duration<Rep, Period>& Rel_time) const;


A chrono::duration object that specifies a maximum time interval that the thread blocks.

A future_status that indicates the reason for returning.

An associated asynchronous state is ready only if its asynchronous provider has stored a return value or stored an exception.

Header: future

Namespace: std

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft