Subject: Re: [boost] [thread] boost::thread and thread safety annotations
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-03-04 17:09:25
Le 26/09/12 11:33, Wladimir a écrit :
> The Clang C++ compiler project is currently working on a thread safety
> By making use of so-called thread safety annotations within the source
> code, several problems with synchronization primitives can be found
> statically. For example: usage of a data structure without acquiring its
> guarding lock.
> See here for an overview of the available attributes:
> It is customary to use these attributes by defining macros, for
> At one time, it was also supposed to end up in G++, but this was
> abandoned in favor of clang (see
> http://gcc.gnu.org/wiki/ThreadSafetyAnnotation). But at least the
> annotations are fairly standardized.
> I think it would be useful to add these annotations to boost::thread, so
> that projects using that library can make use of the static checking.
> As I understand it, is only a matter of marking data structures that
> serve as lock/scoped_lock (such as boost::mutex, boost::recursive_mutex,
> ...), and methods that act upon the lock with the appropriate attributes.
> Any interest in this?
yes why not. Do you have some examples where these annotations could be
used on BoostThread?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk