[Boost-bugs] [Boost C++ Libraries] #7875: BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED should not be enabled by default

Subject: [Boost-bugs] [Boost C++ Libraries] #7875: BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED should not be enabled by default
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-01-10 12:18:21


#7875: BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED should not be enabled by
default
-------------------------------------------------------------+--------------
 Reporter: Andrew Molyneux <andrew.molyneux@…> | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.52.0 | Severity: Problem
 Keywords: |
-------------------------------------------------------------+--------------
 I just upgraded to Boost 1.52 on Windows using pre-built binaries and
 encountered a problem. Because
 BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is enabled by default,
 any code that uses thread::join() will throw an exception if the target
 thread has already finished executing. Fortunately this was picked up by
 our unit tests, but the new behaviour could lead to intermittent race
 condition bugs that could be difficult to track down.

 I've attached a patch (to be applied in libs/thread/build) which comments
 out the BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED defines in the
 jamfile. Failing that, could someone please explain to me why this feature
 is enabled by default? It seems like a recipe for disaster. For example,
 the fix for ticket #7668, which is attempting to work around a bug
 introduced by this feature, seems to introduce a race condition.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7875>
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:11 UTC