Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2004-08-09 16:30:03


Howard Hinnant wrote:
[...]
> The alternative in this link looks very familiar. I'm currently using
> two condition variables, ...

POSIX condition variables strive for "wait-morphing". So you'll end up
with "serial wakes" (quite a waste on, say, 32-way box). The problem
is that waiters must reacquire the mutex. tail_* stuff is supposed to
NOT have this requirement (it's meant to use the associated mutex for
waiters queue "protection"... a la Java monitors, in a way). Well,
take also a look at:

http://www.cs.rochester.edu/u/scott/synchronization/pseudocode/rw.html

regards,
alexander.


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