首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::future_status

Defined in header <future>

?

?

enum class future_status { ready, timeout, deferred };

?

(since C++11)

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

Constant

Explanation

deferred

the shared state contains a deferred function, so the result will be computed only when explicitly requested

ready

the shared state is ready

timeout

the shared state did not become ready before specified timeout duration has passed

另见

wait_for

waits for the result, returns if it is not available for the specified timeout duration (public member function of std::future)

wait_for

waits for the result, returns if it is not available for the specified timeout duration (public member function of std::shared_future)

wait_until

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

wait_until

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

代码语言:txt
复制
 ? cppreference.com

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

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com