Le 24/03/13 18:24, Vicente J. Botet Escriba a écrit :
After more deep insight I'm wondering if write_entered_ is not used to ensure priority for writers. Note that write_entered_ doesn't mean that the mutex is in exclusive mode but that some one has requested to be in. The mutex is in exclusive mode when write_entered_ and n_readers_==0.Le 18/03/13 00:06, Fredrik Orderud a écrit :
I suspect that Howard Hinnant prefered a fair solution.v2/shared_mutex indeed appears to be quite different. From what I can see, it lacks the exclusive_waiting_blocked field. This makes me question if it is capable of prioritizing write-lock request in favor of read-lock requests, as the pthread and win32 equivalents are doing. What are your thoughts on this?
What do you think?