|
libpsynth 0.2.1
|
Time-stamp: <2011-06-13 11:10:35 raskolnikov> More...


Go to the source code of this file.
Classes | |
| struct | psynth::base::try_lock_guard< Mutex > |
| try_lock_guard, lock_guard and no_lock_guard provide a way to design policies that are not bases just on object or class locking, but fine-grainedly control wether some internal construct should have exclusion, probabilistic exclusion or no exclusion at all. More... | |
| struct | psynth::base::lock_guard< Mutex > |
| struct | psynth::base::no_lock_guard< Mutex > |
| struct | psynth::base::no_lock_guard< Mutex >::guard_type |
| class | psynth::base::no_threading< T > |
| struct | psynth::base::no_threading< T >::lock |
| class | psynth::base::lockable_base< T > |
| class | psynth::base::object_lockable< T, Mutex > |
| class | psynth::base::object_lockable< T, Mutex >::lock |
| class | psynth::base::class_lockable< T, Mutex > |
| class | psynth::base::class_lockable< T, Mutex >::lock |
| struct | psynth::base::class_lockable< T, Mutex >::initializer |
Namespaces | |
| namespace | psynth |
| namespace | psynth::base |
Defines | |
| #define | PSYNTH_DEFAULT_THREADING psynth::base::default_object_lockable::type |
| #define | PSYNTH_DEFAULT_NONOBJ_THREADING psynth::base::default_class_lockable::type |
| #define | PSYNTH_DEFAULT_MUTEX std::recursive_mutex |
Typedefs | |
| typedef tpl_bind_snd < object_lockable, PSYNTH_DEFAULT_MUTEX > | psynth::base::default_object_lockable |
| typedef tpl_bind_snd < class_lockable, PSYNTH_DEFAULT_MUTEX > | psynth::base::default_class_lockable |
Functions | |
| template<class Mutex , typename... Args> | |
| std::unique_lock< Mutex > | psynth::base::make_unique_lock (Mutex &lock, Args...args) |
| Utility to avoid writing too many types when locking mutexes. | |
Time-stamp: <2011-06-13 11:10:35 raskolnikov>
This module provides simplified and abstracted threading models that can be used for policy-based designs. It is inspired by Andrei Alexandrescu's implementation at his book Modern C++ Design.
To make the code directly compatible with Boost.Threads we use the Boost mutex interface as threading policy. As such, a MutexPolicy must have the following two methods:
A mutex must also the find, as boost::mutex does, a exception safe RAII wrapper to lock the mutex under the name of:
| #define PSYNTH_DEFAULT_MUTEX std::recursive_mutex |
| #define PSYNTH_DEFAULT_NONOBJ_THREADING psynth::base::default_class_lockable::type |
| #define PSYNTH_DEFAULT_THREADING psynth::base::default_object_lockable::type |
1.7.4