std::thread::detach
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody> void detach(); |
(depuis C++11) | |
Sépare le thread d'exécution de l'objet thread, ce qui permet de poursuivre l'exécution de manière indépendante. Les ressources allouées seront libérés une fois que le thread se termine .
Original:
Separates the thread of execution from the thread object, allowing execution to continue independently. Any allocated resources will be freed once the thread exits.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Après avoir appelé
detach, les conditions suivantes tiendra:Original:
After calling
detach, the following conditions will hold:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
*thisne possède plus de filOriginal:*thisno longer owns any threadThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.joinable() == falseget_id() == std::thread::id()
Paramètres
(Aucun)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Retourne la valeur
(Aucun)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Exceptions
std::system_error si
joinable() == false ou une erreur se produit .Original:
std::system_error if
joinable() == false or an error occurs.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Exemple
| This section is incomplete Reason: no example |
Voir aussi
attend la fin d’exécution d'un thread Original: waits for a thread to finish its execution The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique) | |
vérifie si le fil est joignable, soit potentiellement s'exécute dans un contexte parallèle Original: checks whether the thread is joinable, i.e. potentially running in parallel context The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique) |