Question about the comment in boost::thread condition.hpp

15 Jul
2005
15 Jul
'05
6:51 p.m.
Can anybody shed a light on this? // 23 May 01 WEKEMPF Removed "duration" timed_waits, as they are too // difficult to use with spurious wakeups? I need relative time waits and this comment made me wary. Thanks for your time, Georgi

18 Jul
18 Jul
11:57 a.m.
New subject: Question about the comment in boost::threadcondition.hpp
Georgi Yaralov wrote:
Can anybody shed a light on this?
// 23 May 01 WEKEMPF Removed "duration" timed_waits, as they are too
// difficult to use with spurious wakeups?
I need relative time waits and this comment made me wary.
Since condition waits should always be done in a while loop, it's too easy to miss that the relative timeout needs to be recomputed on each iteration. Absolute timeouts don't have this problem.
7215
Age (days ago)
7218
Last active (days ago)
1 comments
2 participants
participants (2)
-
Georgi Yaralov
-
Peter Dimov