Boost logo

Threads-Devel :

Subject: [Threads-devel] shared_mutex strategy
From: Damien R. (damienrg+list_at_[hidden])
Date: 2010-05-18 16:28:49


Hi,

I looked in shared_mutex.hpp and I think you do not use writer or reader
preference strategy.
The lock() method prevents new readers to acquire the mutex, and when
the last reader release the mutex it notifies all readers and writers
thread, so one writer or one reader will acquire the lock.
If it is a reader, the writer will prevent other reader to acquire the lock.

So, I want to know if what I said is correct, and if it is true, why do
you have chose this implementation ?

Is it not possible to allow writer to acquire the lock when the last
reader release the lock? And is it no possible to allow readers to
acquire the lock when the writer release the lock ?

Thanks,

--
Damien R

Threads-Devel list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk