MADNESS
0.10.1
|
Simple wrapper for Pthread condition variable with its own mutex. More...
#include <worldmutex.h>
Public Member Functions | |
PthreadConditionVariable () | |
virtual | ~PthreadConditionVariable () |
void | broadcast () const |
pthread_mutex_t & | get_pthread_mutex () |
void | lock () const |
void | signal () const |
void | unlock () const |
void | wait () const |
You should have acquired the mutex before entering here. More... | |
Private Attributes | |
pthread_cond_t | cv |
pthread_mutex_t | mutex |
Additional Inherited Members | |
Private Member Functions inherited from NO_DEFAULTS | |
NO_DEFAULTS () | |
NO_DEFAULTS (const NO_DEFAULTS &)=delete | |
NO_DEFAULTS (NO_DEFAULTS &&)=delete | |
NO_DEFAULTS & | operator= (const NO_DEFAULTS &)=delete |
NO_DEFAULTS & | operator= (NO_DEFAULTS &&)=delete |
Simple wrapper for Pthread condition variable with its own mutex.
Use this when you need to block without consuming cycles. Scheduling granularity is at the level of kernel ticks.
|
inlinevirtual |
|
inline |
References cv, and MADNESS_EXCEPTION.
|
inline |
References mutex.
|
inline |
References MADNESS_EXCEPTION, mutex, and madness::detail::print_mutex_error().
|
inline |
References cv, and MADNESS_EXCEPTION.
Referenced by madness::DQueue< T >::push_back_with_lock(), and madness::DQueue< T >::push_front_with_lock().
|
inline |
References MADNESS_EXCEPTION, mutex, and madness::detail::print_mutex_error().
|
inline |
You should have acquired the mutex before entering here.
Referenced by madness::DQueue< T >::pop_front().
|
mutableprivate |
Referenced by PthreadConditionVariable(), ~PthreadConditionVariable(), broadcast(), signal(), and wait().
|
mutableprivate |
Referenced by PthreadConditionVariable(), ~PthreadConditionVariable(), get_pthread_mutex(), lock(), unlock(), and wait().