Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-10-08 08:16:18

Alexander Terekhov wrote:
> Peter Dimov wrote:
>> Pavel Syomin wrote:
>>> This is solve my problems, but why there is nothing about spurious
>>> wakeup in boost documentation?...
>> The older documentation
>> does have a few sentences that mention spurious wakeups; I've no
>> idea how they got lost. I'll CC: the dev list.
> The docu might tell something not only about spurious wakeups but
> also about the fact that return of timedout status doesn't preclude
> consumption of a signal issued concurrently (note that thread
> cancel delivery does preclude it).


Does this mean that timed_wait( lock, xt, pred ) has a bug? Instead of

while (!pred()) { if (!timed_wait(lock, xt)) return false; } return true;

it needs to be

while (!pred()) { if (!timed_wait(lock, xt)) return pred(); } return true;

otherwise a 'false' return can consume a signal meant for someone else
without notifying the caller to handle the pred() == true case?

I probably have the same subtle bug in at least a few places...

Boost list run by bdawes at, gregod at, cpdaniel at, john at