|
Threads-Devel : |
Subject: Re: [Threads-devel] hierarchical_mutex for lock hierarchies (to avoid deadlocks)
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-02-18 07:18:13
Le 17/02/13 22:32, Fredrik Orderud a écrit :
> I've registered a Trac "feature request" for a "hierarchical" mutex to
> facilitate lock hierarchies [1] in boost. Lock hierarchies is a
> construct that associates mutexes with software layer numbers, and
> enforces the application to only lock "downwards" in the software
> hierarchy [2]. This effectively translates potential deadlocks into
> deterministic run-time failures that can more easily be detected
> during testing.
>
> An example draft implementation is attached to the issue. The
> attachment also includes a BOOST_THREAD_LOCAL work-around for missing
> "thread_local" support that should probably be moved to more neutral
> ground
>
> Please let me know if there are any questions regarding the usefulness
> of hierarchical_mutex, or comments on the implementation, and I'll do
> my best to assist.
>
>
Hi,
I have added some comments in
https://svn.boost.org/trac/boost/ticket/8094#comment:1.
I don't know if you should add Anthony as author on the sources as the
code is clearly the same as what he proposes in his book.
Best,
Vicente