id summary reporter owner description type status milestone component version severity resolution keywords cc 7496 [thread] call interrupt() and join() int destructor of a joinable thread Andrzej Krzemienski viboes "boost::thread's destructor calls terminate if joinable, in order to conform to C++11 specification. I am not sure if this is the best course of action. My understanding -- form the C++ Committee papers and informal presentations -- is that the reason for introducing a 'terminating destructor' was the lack of thread cancellation/interruption functionality. Thread interruption is supposed to be the preferred behavior for thread's destructor. std::thread does not support interruption (for some reasons), but boost::thread does (this is already a departure from C++11), so shouldn't the latter prefer to interrupt and join a joinable thread in the destructor? My preference would be to join (rater than detach) after the interruption. If I remember correctly, the argument against joining for std::thread is that there would be an unexpected hang upon reaching the end of the scope. The argument against detaching for std::thread is that the detached thread may be holding references to automatic variables defined in the scope of the forking thread that we are now exiting. I believe that with thread interruption in place the argument against joining is mitigated, while the argument against detaching still holds." Feature Requests closed To Be Determined thread Boost 1.52.0 Problem worksforme thread interrupt join destructor