Boost logo

Boost :

Subject: [boost] [thread] terminating destructor
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2012-10-10 04:23:10


Hi,
I can see in the release notes that in Boost 1.52 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 a joinable thread in the
destructor?

Regards,
&rzej


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk