Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-08-22 17:09:18


Austin Bingham wrote:

> On 2007-08-22, Howard Hinnant <howard.hinnant_at_[hidden]> wrote:
>> I have two answers:
>>
>> 1. This is somewhat of a shocking answer, so please read through the
>> second answer before passing judgement: The proposal purposefully
>> does not mention shared vs exclusive priority. And I would prefer not
>> to.
>>
>> 2. The implementation uses an algorithm which I attribute to
>> Alexander Terekhov.
>
> At the risk of defiling a perfectly good metaphor, I think that if
> Alexander's algorithm is the car, then other policies are more like
> light trucks, pontoon boats, and tricycles. That is, the algorithm
> you describe almost certainly works as suggested, but I may really
> want something completely different.

No, you don't. The other policies are broken cars, not other vehicles.

That said, a POSIX rwlock does grant you the ability to shoot yourself in
the foot by using thread priorities. Readers will not be blocked waiting for
a pending writer of a lower priority.


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