10 May 18:57
[thread] lockable traits and concepts classes adding proposal
From: vicente.botet <vicente.botet <at> wanadoo.fr>
Subject: [thread] lockable traits and concepts classes adding proposal
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-05-10 16:59:36 GMT
Subject: [thread] lockable traits and concepts classes adding proposal
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-05-10 16:59:36 GMT
Hello boosters ,
While writtig a synchronization library I have needed some lockable traits
and concepts.
If you think that these classes are of general use it will be a pleasure for
me, if Anthony accepts, to included them on the Boost.Thread library.
Otherwise I will left them in my sync library. For the moment all is defined
in a sync (as synchronization) namespace and directory but this is without
importance.
Attached a short introduction as well as the header files.
Of course all this is subject to discusion, naming and file structure
changes, ...
For each one of the mutex in the thread library, we need to
* make the mutex inherit from the helper lock_traits_base or
* have nested typedefs or
* specialize each one of the traits templates
As an external library I have do this in a non-intrusive way as for example:
template<>
struct timed_interface_tag<boost::mutex> {
typedef hasnt_timed_interface_tag type;
};
template<>
struct reentrancy_tag<boost::mutex> {
typedef non_recursive_tag type;
(Continue reading)
RSS Feed