Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2004-08-09 12:26:37

On Aug 9, 2004, at 10:26 AM, Alexander Terekhov wrote:

> Yes, but this scheme has a drawback. "Serial wakes across context
> switching" (in addition to locking across context switching). For
> alternative, see (for example)
> (Subject: Re: rwlock using pthread_cond)

The alternative in this link looks very familiar. I'm currently using
two condition variables, an unsigned, and two bools (oh, and of course
the mutex). Although after looking at your example I think I could
probably merge my unsigned and two bools into an int and one bool
(because of padding, may not be worth the effort though). My two
condition variables are used slightly differently than yours because of
the additional requirements of:


and of course there's the conversion-functions:

Sorry I can't just show the code.


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