名前空間
変種
操作

std::stop_source::get_token

提供: cppreference.com
< cpp‎ | thread‎ | stop source
 
 
スレッドサポートライブラリ
スレッド
(C++11)
(C++20)
(C++20)
this_thread 名前空間
(C++11)
(C++11)
(C++11)
相互排他
(C++11)
汎用ロック管理
(C++11)
(C++11)
(C++11)
(C++11)(C++11)(C++11)
(C++11)
(C++11)
条件変数
(C++11)
セマフォ
ラッチとバリア
(C++20)
(C++20)
フューチャー
(C++11)
(C++11)
(C++11)
(C++11)
 
 
[[nodiscard]] std::stop_token get_token() const noexcept;
(C++20以上)

stop_source が停止状態を持つ場合は、その停止状態に紐付いた stop_token オブジェクトを返します。 そうでなければ、デフォルト構築された (空の) stop_token を返します。

[編集] 引数

(なし)

[編集] 戻り値

stop_token オブジェクト (this->stop_possible() == false の場合は空です)。

[編集]