Boost logo

Boost :

Subject: Re: [boost] [thread] On shared_mutex
From: Howard Hinnant (howard.hinnant_at_[hidden])
Date: 2010-11-28 17:27:45


On Nov 28, 2010, at 5:21 PM, Jeffrey Lee Hellrung, Jr. wrote:

> On 11/28/2010 12:52 PM, Howard Hinnant wrote:
>> Three years ago I wrote N2406 "Mutex, Lock, Condition Variable Rationale" (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2406.html) for the C++ committee in an attempt to explain the combined proposed std::mutex/std::unique_lock package and how it fit together with the tr2-targeted shared_mutex/shared_lock package. This paper also proposed an upgrade_mutex and upgrade_lock.
>>
>> Since that time, the std-proposed stuff has been accepted with some name changes, and a reworking of the timed-locking interface. Additionally Anthony Williams has implemented much of the shared-locking functionality in boost (and done a very nice job with it).
>>
>> That being said, I disagree with some fairly major design changes between N2406 and what is now in the boost library. Four of the major changes are:
> [...]
>> There is a tutorial-style description of this library here:
>>
>> http://home.roadrunner.com/~hinnant/mutexes/locking.html
> [...]
>
> I've been reading through the tutorial, and have a correction (I think) in the definition of A in the "unique_lock tutorial" section. A::mut_ is declared as a std::unique_lock<std::mutex>, but I would think it should be just a plain std::mutex, unless I'm missing something.

You are correct, thanks! What was I thinking?! :-) Corrected:

http://home.roadrunner.com/~hinnant/mutexes/locking.html

-Howard


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk