libpsynth 0.2.1
Public Types | Public Member Functions
psynth::base::try_lock_guard< Mutex > Struct Template Reference

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...

#include <threads.hpp>

Inheritance diagram for psynth::base::try_lock_guard< Mutex >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::unique_lock< Mutex > guard_type

Public Member Functions

guard_type default_guard ()
template<typename... Args>
guard_type guard (Args...args)
void lock ()
bool try_lock ()
void unlock ()

Detailed Description

template<class Mutex = std::mutex>
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.


Member Typedef Documentation

template<class Mutex = std::mutex>
typedef std::unique_lock<Mutex> psynth::base::try_lock_guard< Mutex >::guard_type

Member Function Documentation

template<class Mutex = std::mutex>
guard_type psynth::base::try_lock_guard< Mutex >::default_guard ( ) [inline]
template<class Mutex = std::mutex>
template<typename... Args>
guard_type psynth::base::try_lock_guard< Mutex >::guard ( Args...  args) [inline]
template<class Mutex = std::mutex>
void psynth::base::try_lock_guard< Mutex >::lock ( ) [inline]
template<class Mutex = std::mutex>
bool psynth::base::try_lock_guard< Mutex >::try_lock ( ) [inline]
template<class Mutex = std::mutex>
void psynth::base::try_lock_guard< Mutex >::unlock ( ) [inline]

The documentation for this struct was generated from the following file: