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-01-17 16:52:02


Le 17/01/13 20:00, Fredrik Orderud a écrit :
> On Thu, Jan 10, 2013 at 11:47 PM, Fredrik Orderud <forderud_at_[hidden]
> <mailto:forderud_at_[hidden]>> wrote:
>
> Attached is an updated patch that also updates the upgrade part.
> All boost::thread unit-tests still pass, and I think the changes
> makes shared_mutex easier to understand.
>
> On first sight, it might appear like some of the upgrade-related
> methods becomes less efficient due to state_data members being
> modified several times redundantly (e.g. in
> try_unlock_shared_and_lock_upgrade), but that is something the
> compiler should be able to optimize away. Also, I might have
> introduced a slight change in behavior in unlock_upgrade_and_lock,
> due to state.upgrade now being reset before upgrade_cond.wait(lk)
> (as opposed to before), but my impression is that it shouldn't matter.
>
> Please review the patch, and let me know if you have any questions.
>
>
> Vicente,
> have you had time to take a look at my updated patch yet?
>
> If you're concerned about the size of the patch, then I would be more
> than happy to divide it up into smaller "bite-sized" change-sets that
> can be reviewed more easily.
>
>
Hi,

I'm busy fixing some bugs to be included on Boost 1.53. I will take in
account your patch on two weeks. You don't need to change the patch,
I've the impression that it is good enough, but I don't want to
destabilize release 1.53 with this refactoring. We will have enough time
for release 1.54.

For the time been you could try to adapt your patch to shared priority
mutex in a different file.

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