std::jthread:: operator=
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
|
jthread::operator=
|
||||
| Observers | ||||
| Operations | ||||
| Stop token handling | ||||
| Non-member functions | ||||
|
std::
jthread
&
operator
=
(
std::
jthread
&&
other
)
noexcept
;
|
(depuis C++20) | |
Si * this possède encore un thread associé en cours d'exécution (c'est-à-dire si joinable ( ) == true ), appelle request_stop ( ) suivi de join ( ) . Attribue l'état de other à * this et définit other à un état construit par défaut.
Après cet appel, this - > get_id ( ) est égal à la valeur de other. get_id ( ) avant l'appel et l'état d'arrêt associé est également déplacé, et other ne représente plus un thread d'exécution ni ne possède d'état d'arrêt.
Paramètres
| autre | - |
un autre
jthread
objet à assigner à cet
jthread
objet
|
Valeur de retour
* this