Subject: Re: [Threads-devel] Extend shared_mutex with support for priority policies?
From: Gaetano Mendola (mendola_at_[hidden])
Date: 2013-05-13 13:38:16
On 12/05/2013 02.24, Vicente J. Botet Escriba wrote:
> Le 11/05/13 20:34, Gaetano Mendola a écrit :
>> On 15/12/2012 19.16, Fredrik Orderud wrote:
>>> The current "fair" shared_mutex implementation is great in the sense
>>> that it neither favors readers nor writers. This is probably a good
>>> property in most situations.
>> Why do you say fair? Current mutexes (shared or not) implementation in
>> boost is all but fair, that's why (at my understanding) at least on
>> Linux they are based on pthread mutexes (they are not fair / fifo).
> We are talking here of shared_mutex. But in which sens non-shared mutex
> can be not fair?
I'm not saying they can not be fair, I'm saying that in general
boost::mutex are not fair, indeed they can starv threads blocked on