Subject: [Boost-bugs] [Boost C++ Libraries] #6787: boost::thread::sleep() hangs if system time is rolled back
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-04-13 12:47:30
#6787: boost::thread::sleep() hangs if system time is rolled back
--------------------------------------------------------+-------------------
Reporter: Artem Gayardo-Matrosov <boost@â¦> | Owner: anthonyw
Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
Version: Boost 1.49.0 | Severity: Problem
Keywords: |
--------------------------------------------------------+-------------------
Steps to reproduce:
1. Compile and run the following code
{{{#!cpp
int i = 0;
while(true)
{
printf("%d\n", ++i);
boost::this_thread::sleep( boost::posix_time::milliseconds(1000));
}
}}}
2. While it runs, rewind the system time by 1 hour back.
Expected result:
The code continues to print every second.
Actual result:
The code stops printing anything. I doesn't continue even after I've put
the time back to current.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6787> 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:09 UTC