std::jthread:: operator=
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
|
jthread::operator=
|
||||
| Observers | ||||
| Operations | ||||
| Stop token handling | ||||
| Non-member functions | ||||
|
std::
jthread
&
operator
=
(
std::
jthread
&&
other
)
noexcept
;
|
(desde C++20) | |
Si * this todavía tiene un hilo asociado en ejecución (es decir, joinable ( ) == true ), llama a request_stop ( ) seguido de join ( ) . Asigna el estado de other a * this y establece other a un estado construido por defecto.
Después de esta llamada, this - > get_id ( ) es igual al valor de other. get_id ( ) previo a la llamada y el estado de parada asociado también se transfiere, y other ya no representa un hilo de ejecución ni tiene ningún estado de parada.
Parámetros
| otro | - |
otro objeto
jthread
para asignar a este objeto
jthread
|
Valor de retorno
* this