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-27 07:18:44


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

Comment (by lumosimann@…):

 I now get a segfault due to infinite recursion.

 This is consequence of
 https://github.com/boostorg/thread/commit/c7348b29cf8bfa1272645d04784419d37e1e7db5
 #diff-8a73888d7fa5a2b2b38f85db61376ba4L517

 This line is for WIN32, I don't know whether this makes sense there, but
 for sure you need to add the fix in the linux section too, i.e.

 {{{
 diff --git a/include/boost/thread/detail/thread.hpp
 b/include/boost/thread/detail/thread.hpp
 index 8dc6a9c..a67e8ea 100644
 --- a/include/boost/thread/detail/thread.hpp
 +++ b/include/boost/thread/detail/thread.hpp
 @@ -542,7 +542,7 @@ namespace boost
          }
  #endif
  #ifdef BOOST_THREAD_USES_CHRONO
 - bool try_join_until(const
 chrono::time_point<chrono::system_clock, chrono::nanoseconds>& tp)
 + bool try_join_until(const chrono::time_point<my_clock_t,
 chrono::nanoseconds>& tp)
          {
            using namespace chrono;
            nanoseconds d = tp.time_since_epoch();
 }}}

 Otherwise we will infinitely recurse into try_join_until.

 Although this fix is only temporary, I would recommend renaming my_clock_t
 and move it to the detail-namespace.

 Could this also be a fix for https://svn.boost.org/trac/boost/ticket/6787?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12519#comment:16>
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-27 07:22:04 UTC