Re: [Boost-bugs] [Boost C++ Libraries] #12519: boost::thread::try_join_for does not return after timeout

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12519: boost::thread::try_join_for does not return after timeout
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-02-22 14:17:56


#12519: boost::thread::try_join_for does not return after timeout
---------------------------+----------------------
  Reporter: mweb@… | Owner: viboes
      Type: Bugs | Status: assigned
 Milestone: Boost 1.64.0 | Component: thread
   Version: Boost 1.61.0 | Severity: Problem
Resolution: | Keywords:
---------------------------+----------------------

Comment (by lumosimann@…):

 We now found a temporary fix for this problem. Please check

 https://gist.github.com/lukasm91/9732228f33e92963bb8762dac519e79f

 Note that there are two bugs involved, one in sleep_for, and one in
 try_join_for. We found two functions where a differentiation between
 monotonic and non-monotonic time was missing, such that some functions
 always used monotonic, and others always used non-monotonic time.

 There is also an updated test file attached. Consider that when you
 undefine
 BOOST_THREAD_HAS_CONDATTR_SET_CLOCK_MONOTONIC, this currently needs to be
 done in libs/thread/src/pthread/thread.cpp too, otherwise the compiler
 won't find the correct template specialization. The old behavior can be
 reactivated by undefining USEFIXES.

 @viboes Could you please check this fix and incorperate it into boost? We
 know that most probably a few #ifdefs are missing, but this fix currently
 solves our problems.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12519#comment:9>
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-22 14:22:02 UTC