std::future_status
来自 cppreference.cn
定义于头文件 <future> |
||
enum class future_status { ready, |
(自 C++11 起) | |
指定 std::future 和 std::shared_future 的 wait_for
和 wait_until
函数返回的 future 的状态。
[编辑] 常量
名称 | 解释 |
deferred
|
共享状态包含一个延迟函数,因此只有在显式请求时才会计算结果 |
ready
|
共享状态已就绪 |
timeout
|
共享状态在指定的超时时长过去之前未就绪 |
[编辑] 参见
等待结果,如果在指定的超时时长内不可用则返回 ( std::future<T> 的公有成员函数) | |
等待结果,如果在指定的超时时长内不可用则返回 ( std::shared_future<T> 的公有成员函数) | |
等待结果,如果直到指定时间点仍不可用则返回 ( std::future<T> 的公有成员函数) | |
等待结果,如果直到指定时间点仍不可用则返回 ( std::shared_future<T> 的公有成员函数) |