Boost logo

Threads-Devel :

Subject: Re: [Threads-devel] RFC: 1st pthread shared_mutex refactoring patch
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-03-17 14:53:59


Le 17/03/13 11:32, Fredrik Orderud a écrit :
>
> Vicente,
> have you had time to examine my patch yet?
>
> Please let me know if there is something I can do to expedite the
> process. If preferable, I can e.g. break it up into a series of
> smaller patches. If accepted, I want to do the same refactoring also
> for the win32 shared_mutex, and finally unify the state_data
> inner-class between the pthread and win32 implementations, so that the
> implementations behave consistently.

After a more deep analysis, it seems to me that the encapsulated data
and the condition variables are quite correlated, that is, changing the
way the data is managed should have some impacts on which condition
variable should be notified or waited on. For example, the
implementation in boost/thread/v2/shared_mutex.hpp uses only two
condition variables instead of 3 in boost/thread/pthread/shared_mutex.hpp.

Could you tell me what is the added value of doing this refactoring?

BTW, I had in mind to split the the shared_mutex class into shared_mutex
and a upgrade_mutex following the design in
boost/thread/v2/shared_mutex.hpp. This has the advantage to make
possible to improve the performances of shared_mutex as there are less
constraints.

Best,
Vicente


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