std::experimental::shared_future
來自 cppreference.com
定義於標頭檔案 <experimental/shared_future> |
||
template< class T > class shared_future; |
(1) | (併發技術規範) |
template< class T > class shared_future<T&>; |
(2) | (併發技術規範) |
template<> class shared_future<void>; |
(3) | (併發技術規範) |
類模板 std::experimental::shared_future
以如下操作擴充套件了 std::shared_future
- 一個從
future<shared_future<T>>
進行的解包建構函式(unwrapping constructor); - 一個成員函式
is_ready
用於查詢關聯的共享狀態是否就緒;以及 - 一個成員函式
then
用於為 future 附加一個延續(continuation)。
std::experimental::shared_future
和 std::shared_future 之間沒有互操作性。
目錄 |
[編輯] 成員函式
構造一個 shared_future (公開成員函式) | |
檢查共享狀態是否就緒 (公開成員函式) | |
為一個 shared_future 附加一個延續(公開成員函式) | |
賦值內容 (公開成員函式) |
[編輯] 示例
本節不完整 原因:無示例 |
[編輯] 參閱
(併發技術規範) |
透過延續和其他特性增強的 std::future 版本 (類模板) |