Re: [Boost-bugs] [Boost C++ Libraries] #6787: boost::thread::sleep() hangs if system time is rolled back

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6787: boost::thread::sleep() hangs if system time is rolled back
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-07 07:04:53


#6787: boost::thread::sleep() hangs if system time is rolled back
-----------------------------------------------+---------------------
  Reporter: Artem Gayardo-Matrosov <boost@…> | Owner: viboes
      Type: Bugs | Status: closed
 Milestone: Boost 1.57.0 | Component: thread
   Version: Boost 1.49.0 | Severity: Problem
Resolution: fixed | Keywords:
-----------------------------------------------+---------------------

Comment (by Michael Sternberg):

 The problem still wasn't fixed when boost::this_thread::sleep is running
 in thread. Consider the following piece of code, sleep still hangs when
 system is rolled backwards:

 #include <stdio.h>
 #include <boost/thread.hpp>
 int i = 0;
 void testfunc()
 {
     while(true)
     {
         printf("%d\n", ++i);
         boost::this_thread::sleep( boost::posix_time::milliseconds(800));
     }
 }

 int main()
 {
     boost::thread * th = new boost::thread(&testfunc);
     th->join();
     return 0;
 }

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6787#comment:20>
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:17 UTC