Boost logo

Boost :

From: Stjepan Rajko (stipe_at_[hidden])
Date: 2008-09-01 14:00:49


On Mon, Sep 1, 2008 at 10:50 AM, Giovanni Piero Deretta
<gpderetta_at_[hidden]> wrote:
>
> Spurious wakeups are rare in practice. OTOH, what is more likely to
> happen is that the main thread could miss the wake-up if the worker
> thread managed to signal the condition variable before the main thread
> got to wait for it (remember that condition variables are stateless).
>

Wouldn't the mutex lock have taken care of that? asio_server blocks
before notifying, and the main thread doesn't release the mutex until
getting to the wait point.

Stjepan


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk