Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9856: [windows] condition_variable::wait_for returns wrong cv_status on timeout.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-02-01 01:41:22
#9856: [windows] condition_variable::wait_for returns wrong cv_status on timeout.
-------------------------+-------------------------------------------------
Reporter: pi88el@⦠| Owner: ned14
Type: Bugs | Status: new
Milestone: | Component: thread
Version: Boost | Severity: Problem
1.57.0 | Keywords: condition_variable wait_for
Resolution: | cv_status
-------------------------+-------------------------------------------------
Comment (by ned14):
Replying to [comment:19 viboes]:
> It seems this is related to #10967 and #9720.
It does appear that Windows respects the timeout you pass to a waitable
timer, whilst it fuzzes any timeout given to WaitForMultipleObjects to be
either too short or too long (on average 30% too long).
BTW I have more empirical findings. It turns out Windows ignores all
TolerableDelay values <= 26 ms. I have no idea why. But 27 ms is
definitely the minimum for it to have any effect at all.
Windows usually ticks at 15.6 ms, so a tolerable delay of 27 ms is about
1.75 context switches. Do I have permission to set that minimum for all
timers i.e.
27 ms <= tolerable delay <= 5% of duration between now and timeout.
Do we need an upper bound on tolerable delay? I can't see Windows running
for ten seconds without at least one interrupt firing though ...
Niall
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9856#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