3 ms·
> std::thread crashing in destructor when the user doesn't call std::thread::join, nor std::thread::detach. this has been 'fixed' with jthread. FWIW I think it
by gpderetta 6y ago
> std::thread crashing in destructor when the user doesn't call std::thread::join, nor std::thread::detach.
this has been 'fixed' with jthread. FWIW I think it is a mistake, blocking in a destructor is can easily lead to deadlocks (I have first hand experience, it is not just a theoretical issue). Detaching is not an option either.