Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

future::wait_for Method

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

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

Rel_time

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

Show:
© 2015 Microsoft