Boost logo

Boost :

From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2008-01-24 10:08:37

Kowalke Oliver (QD IT PA AS <Oliver.Kowalke <at>> writes:

> will shared_mutex replace read_write_mutex?


> Where can I reasd more about the usage of shared_mutex
> ( doesn't contain an

It will be in the new docs when I get them finished. In the meantime, you can
read Howard's papers presented to the C++ Standards committee: --- original
proposal featuring shared_mutex --- rational
which includes shared_mutex discussion.

Note that boost::shared_mutex currently includes the upgrade_mutex behaviour.

Basically unique_lock<shared_mutex> will give you a write lock,
shared_lock<shared_mutex> will give you a read lock, and
upgrade_mutex<shared_mutex> will give you a read lock than you can upgrade by
transferring ownership (with move) to a unique_lock<shared_mutex>.


Boost list run by bdawes at, gregod at, cpdaniel at, john at