[Boost-bugs] [Boost C++ Libraries] #6266: c++11 complicance: thread destructor should call terminate if joinable

Subject: [Boost-bugs] [Boost C++ Libraries] #6266: c++11 complicance: thread destructor should call terminate if joinable
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-12-14 19:24:21


#6266: c++11 complicance: thread destructor should call terminate if joinable
---------------------------------------------+------------------------------
 Reporter: viboes | Owner: anthonyw
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.48.0 | Severity: Problem
 Keywords: c++11 compliance thread dtor V2 |
---------------------------------------------+------------------------------
 In order to be standard compliant the thread destructor should call
 terminate if joinable instead of detaching the thread.

 "30.3.1.3 thread destructor [thread.thread.destr]

 ~thread();

 If joinable() then terminate(), otherwise no effects.
 [Note: Either implicitly detaching or joining a joinable() thread in its
 destructor could result in difficult to debug correctness (for detach) or
 performance (for join) bugs encountered only when an exception is raised.
 Thus the programmer must ensure that the destructor is never executed
 while the thread is still joinable. — end note ]"

 This behavior is incompatible with the current version, so it shall be
 activated by a specific define, i.e., BOOST_THREAD_VERSION=2.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6266>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC