Namespaces
Variants

std::stop_token:: stop_token

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
Mutual exclusion
Generic lock management
Condition variables
(C++11)
Semaphores
Latches and Barriers
(C++20)
(C++20)
Futures
(C++11)
(C++11)
(C++11)
Safe reclamation
Hazard pointers
Atomic types
(C++11)
(C++20)
Initialization of atomic types
(C++11) (deprecated in C++20)
(C++11) (deprecated in C++20)
Memory ordering
(C++11) (deprecated in C++26)
Free functions for atomic operations
Free functions for atomic flags
stop_token ( ) noexcept ;
(1) (C++20以降)
stop_token ( const stop_token & other ) noexcept ;
(2) (C++20以降)
stop_token ( stop_token && other ) noexcept ;
(3) (C++20以降)

新しい stop_token オブジェクトを構築します。

1) 関連する停止状態を持たない空の stop_token を構築します。
2) コピーコンストラクタ。 stop_token の関連付けられた停止状態を other と同じものとして構築します。
3) ムーブコンストラクタ。 stop_token を構築し、その関連付けられた停止状態は other と同じになる; other は空の状態になる。

パラメータ

その他 - この stop_token オブジェクトを構築するための 別の stop_token オブジェクト

事後条件

1) stop_possible() および stop_requested() は両方とも false です。
2) * this other は同じ関連付けられた停止状態を共有し、等価であると比較されます。
3) * this other の以前に関連付けられていた停止状態を持ち、かつ other. stop_possible ( ) false である。