[cpp-threads] atomic operations package
Peter Dimov
pdimov at mmltd.net
Thu Oct 13 18:48:35 BST 2005
Alexander Terekhov wrote:
> On 10/9/05, Peter Dimov <pdimov at mmltd.net> wrote:
>> Consider a mostly lock-free data structure where most operations
>> (insert, delete, find) can proceed in parallel, but some (resize)
>> need exclusive lock. It's natural to use a rwlock for that; a rwlock
>> is not about reads or writes, it's about shared and exclusive access.
>
> ...I don't get it.
You may be right. It seems that even for this case the read/write mutex does
not need to constrain writes on rdlock. I can post a snapshot of my
concurrent_hash_map implementation if you're interested.
More information about the cpp-threads
mailing list