名前空間
変種
操作

std::experimental::shared_future

From cppreference.com
 
 
 
 
 
ヘッダー <experimental/shared_future> で定義
template< class T > class shared_future;
(1) (concurrency TS)
template< class T > class shared_future<T&>;
(2) (concurrency TS)
template<>          class shared_future<void>;
(3) (concurrency TS)

クラステンプレート std::experimental::shared_future は、以下の操作で std::shared_future を拡張します。

  • future<shared_future<T>> からのアンラッピングコンストラクタ
  • 関連する共有状態が準備完了かどうかを問い合わせるメンバ関数 is_ready
  • future に継続処理をアタッチするためのメンバ関数 then

std::experimental::shared_futurestd::shared_future の間には相互運用性はありません。

目次

[編集] メンバ関数

shared_future を構築します。
(public member function) [編集]
共有状態が準備完了かどうかをチェックします。
(public member function) [編集]
shared_future に継続処理をアタッチします。
(public member function) [編集]
内容を代入する
(public member function)

std::shared_future と同一のメンバー

メンバ関数

futureオブジェクトを破棄します。
(std::shared_future<T> の public member function)
結果の取得
結果を返します。
(std::shared_future<T> の public member function) [編集]
状態 (State)
futureが共有状態を持っているかどうかをチェックします。
(std::shared_future<T> の public member function) [編集]
結果が利用可能になるまで待機します。
(std::shared_future<T> の public member function) [編集]
指定されたタイムアウト時間内に結果が利用可能でない場合、待機して戻ります。
(std::shared_future<T> の public member function) [編集]
指定された時刻までに結果が利用可能でない場合、待機して戻ります。
(std::shared_future<T> の public member function) [編集]

[編集]

[編集] 関連項目

(concurrency TS)
継続処理やその他の機能で拡張された std::future のバージョン。
(class template) [編集]
English 日本語 中文(简体) 中文(繁體)