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(); |
(desde C++11) | |
Separa o segmento de execução do objeto segmento, permitindo a execução de continuar de forma independente. Quaisquer recursos alocados serão liberados uma vez que as saídas de rosca.
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.
Depois de chamar
detach, as seguintes condições irá realizar: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.
*thisjá não possui qualquer segmentoOriginal:*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()
Parâmetros
(Nenhum)
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.
Valor de retorno
(Nenhum)
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.
Exceções
std::system_error se
joinable() == false ou ocorre um erro.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.
Exemplo
| Esta seção está incompleta Motivo: sem exemplo |
Veja também
| espera que um objeto thread termine sua execução antes de sair da função (função pública membro) | |
verifica se o segmento está acopláveis, ou seja, potencialmente executado no contexto paralelo 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. (função pública membro) | |