std::thread::detach (3) - Linux Manuals
std::thread::detach: std::thread::detach
NAME
std::thread::detach - std::thread::detach
Synopsis
void detach(); (since C++11)
Separates the thread of execution from the thread object, allowing execution to continue independently. Any allocated resources will be freed once the thread exits.
After calling detach *this no longer owns any thread.
Parameters
(none)
Return value
(none)
Postconditions
joinable is false
Exceptions
std::system_error if joinable() == false or an error occurs.
Example
// Run this code
Possible output:
References
* C++11 standard (ISO/IEC 14882:2011):
See also
join (public member function)
joinable (public member function)