std::future_status
科技促进发展:未来[医]地位
Defined in header | | |
---|---|---|
enum class future_status { ready, timeout, deferred }; | | (since C++11) |
返回的未来状态。wait_for
和wait_until
职能std::future
和std::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) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。