std::thread::~thread
| ~thread(); |
(since C++11) | |
Destroys the thread object.
If *this has an associated thread (joinable() == true), std::terminate() is called.
[edit] Notes
A thread object does not have an associated thread (and is safe to destroy) after
[edit] Example
#include <thread> using namespace std::chrono_literals; int main() { auto bleah = std::thread{ []{ std::this_thread::sleep_for(13ms); } }; } // ~thread calls std::terminate()
Possible output:
terminate called without an active exception
[edit] See also
if joinable() is true, calls request_stop() and then join(); in either case destructs the jthread object (public member function of std::jthread)
|

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
