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: 2013-12-09 23:51:12


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

Comment (by Ki Hong Lee <clydelee@…>):

 Steps to reproduce:
  1. Compile and run the following code
 {{{
 #include <iostream>
 #include <boost/thread.hpp>

 void some_job()
 {
     while (true) {
         boost::this_thread::sleep_for(boost::chrono::seconds(1));
         std::cout << "i'm awaken !" << std::endl;
     }
 }


 int main()
 {
     boost::thread thrd(some_job);
     thrd.join();

     return 0;
 }
 }}}

  2. While it runs, rewind the system time by 1 hour back.

 Expected result: thread(some_job) is an infinite loop.[[BR]]

 Actual result : thread(some_job) is blocked.

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