|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
jthread::~jthread | ||||
| Observers | ||||
| Operations | ||||
| Stop token handling | ||||
| Non-member functions | ||||
~jthread(); | (since C++20) | |
Destroys thejthread object.
If*this has an associated thread (joinable()==true), callsrequest_stop() and thenjoin().
Therequest_stop() has no effect if thejthread was previously requested to stop.
Ajthread object does not have an associated thread after
Ifjoin() throws an exception (e.g. because deadlock is detected),std::terminate() may be called.
| This section is incomplete Reason: no example |
| destructs the thread object, underlying thread must be joined or detached (public member function of std::thread)[edit] |