Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2006-09-20 05:05:10


Anthony Williams wrote:
[...]
> He claims that the second A: lock takes the slow path, when it could have
> taken the fast path because the lock is free. I disagree. The lock is NOT
> free, since B is waiting on it. If A can take the fast path here, that's
> opening the door for B to be starved.

That's not a problem as long what we need is efficient low level
exclusive lock. If starvation is a problem, one can solve it with
custom scheduling monitor on top of "grab if you can" low level
exclusive lock without handoff. Low level, all pigs are equal. ;-)

regards,
alexander.


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