Ticket #7665 (closed Bugs: fixed)
this_thread::sleep_for no longer uses steady_clock in thread
|Reported by:||ewdevel@…||Owned by:||viboes|
In 1.51 sleep_for slept for set time no matter what [unless it received interrupt]. In 1.52 sleep_for behaves like normal sleep [system_clock, which introduces problems witch changing time while sleeping] if in new thread.
How to reproduce: Compile and run the test. Change time [date -s 10:00:00].
Main thread will exit sleep_for after 10 seconds. Boost::thread will end after some other time.
In correct situation [ex. boost 1.51] they should end simultaneously.
I think it's introduced in revision 80450.
Example program demonstrating this behavior is attached.
- Owner changed from anthonyw to viboes
- Status changed from new to assigned
- Summary changed from this_thread::sleep_for no longer uses steady_clock in thread to l
- Milestone changed from To Be Determined to Boost 1.53.0
- Summary changed from l to sleep_for doesn't use steady_clock
- Summary changed from sleep_for doesn't use steady_clock to this_thread::sleep_for no longer uses steady_clock in thread