Namespaces
Variants

std::stop_token:: operator=

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
std:: stop_token & operator = ( const std:: stop_token & other ) noexcept ;
(1) (C++20 이후)
std:: stop_token & operator = ( std:: stop_token && other ) noexcept ;
(2) (C++20 이후)

연결된 중지 상태를 other 의 상태로 대체합니다.

1) other 의 연관된 stop-state를 * this 의 stop-state에 복사 할당합니다. stop_token ( other ) . swap ( * this ) 와 동등합니다.
2) other 의 연관된 stop-state를 * this 의 stop-state로 이동 할당합니다. 할당 후, * this other 의 이전 연관된 stop-state를 포함하고, other 는 연관된 stop-state를 갖지 않습니다. stop_token ( std :: move ( other ) ) . swap ( * this ) 와 동등합니다.

매개변수

other - stop-state를 공유하거나 획득할 다른 stop_token 객체