
9 Aug
2004
9 Aug
'04
9:30 p.m.
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.