Subject: Re: [boost] [thread] Request review of new synchronisation object, boost::permit<>
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2014-05-06 12:10:42
Peter Dimov wrote:
> You are not the first to assume that spurious wakeups represent a deficiency
> in the POSIX specification and that it would have been better without them,
> but this is not true, at least in principle. (Pragmatically speaking,
> without spurious wakeups, incorrect code fails less often, sometimes "never"
> for practical purposes. But... well.)
My experience of this was with signals, e.g. sigtimer, on Linux;
a library that I was trying to use worked fine until I had a timer
firing 50 times each second, which caused spurious wakeups in
the futex syscall. This took a ridiculously long time to debug.
It would actually be worthwhile to have a debug condvar implementation
that would deliberately wakeup "spuriously" with some probability.
That could even be a useful addition to Boost, if someone wanted
to write it.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk