Re: [Boost-bugs] [Boost C++ Libraries] #9720: boost::this_thread::sleep_for() sometimes returns immediately on win32

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9720: boost::this_thread::sleep_for() sometimes returns immediately on win32
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-03-02 20:40:44


#9720: boost::this_thread::sleep_for() sometimes returns immediately on win32
-------------------------+-------------------------------------------------
  Reporter: Lars | Owner: viboes
  Hagström <lars@…> | Status: assigned
      Type: Bugs | Component: thread
 Milestone: To Be | Severity: Problem
  Determined | Keywords: chrono thread
   Version: Boost | QueryPerformanceCounter
  1.55.0 |
Resolution: |
-------------------------+-------------------------------------------------

Comment (by Lars Hagström <lars@…>):

 I just realized what the problem is!

 It's not a QPC problem after all. It's the static in steady_clock::now.
 I've got 50 threads trying to initialize that static variable at the same
 time, of course things go wrong :-)

 No idea of how to fix it in an efficient manner, though.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9720#comment:4>
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:15 UTC