在线文档教程
C++
线程支持 | Thread support

std::future_status

科技促进发展:未来[医]地位

Defined in header
enum class future_status { ready, timeout, deferred };(since C++11)

返回的未来状态。wait_forwait_until职能std::futurestd::shared_future...

ConstantExplanation
deferredthe shared state contains a deferred function, so the result will be computed only when explicitly requested
readythe shared state is ready
timeoutthe shared state did not become ready before specified timeout duration has passed

另见

wait_forwaits for the result, returns if it is not available for the specified timeout duration (public member function of std::future)
wait_forwaits for the result, returns if it is not available for the specified timeout duration (public member function of std::shared_future)
wait_untilwaits for the result, returns if it is not available until specified time point has been reached (public member function of std::future)
wait_untilwaits for the result, returns if it is not available until specified time point has been reached (public member function of std::shared_future)

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppreference.com/w/cpp/线程/前途[医]地位