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) (desde C++20)
stop_token ( const stop_token & other ) noexcept ;
(2) (desde C++20)
stop_token ( stop_token && other ) noexcept ;
(3) (desde C++20)

Construye un nuevo objeto stop_token .

1) Construye un stop_token vacío sin estado de parada asociado.
2) Constructor de copia. Construye un stop_token cuyo estado de parada asociado es el mismo que el de other .
3) Constructor de movimiento. Construye un stop_token cuyo estado de parada asociado es el mismo que el de other ; other queda vacío.

Parámetros

otro - otro objeto stop_token para construir este objeto stop_token con

Postcondiciones

1) stop_possible() y stop_requested() son ambos false .
2) * this y other comparten el mismo estado de parada asociado y son iguales.
3) * this tiene other 's estado de parada previamente asociado, y other. stop_possible ( ) es false .