Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8323: boost::thread::try_join_for/try_join_until may block indefinitely due to a combination of problems in Boost.Thread and Boost.Chrono
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-03-23 00:49:46
#8323: boost::thread::try_join_for/try_join_until may block indefinitely due to a
combination of problems in Boost.Thread and Boost.Chrono
-----------------------------------------+----------------------------------
Reporter: szakharchenko@⦠| Owner: anthonyw
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.50.0 | Severity: Problem
Resolution: | Keywords: thread, chrono, steady_clock, try_jon_for, try_join_until, QueryPerformanceCounter
-----------------------------------------+----------------------------------
Comment (by viboes):
Maybe the problem is that the system_clock is taken too early
Coulod you try
{{{
typename Clock::time_point c_now = Clock::now();
return try_join_until(system_clock::now() + ceil<nanoseconds>(t
- c_now));
}}}
instead of
{{{
system_clock::time_point s_now = system_clock::now();
typename Clock::time_point c_now = Clock::now();
return try_join_until(s_now + ceil<nanoseconds>(t - c_now));
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8323#comment:2> 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:12 UTC