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 는 빈 상태로 남게 됩니다.

매개변수

other - stop_token 객체를 생성하기 위한 다른 stop_token 객체

사후 조건

1) stop_possible() stop_requested() 모두 false 입니다.
2) * this other 는 동일한 연관된 중지 상태를 공유하며 동등하게 비교됩니다.
3) * this other 의 이전에 연결된 stop-state를 가지며, other. stop_possible ( ) false 입니다.