MADNESS  version 0.9
Public Member Functions | List of all members
madness::PthreadConditionVariable Class Reference

Simple wrapper for Pthread condition variable with its own mutex. More...

#include <worldmutex.h>

Inheritance diagram for madness::PthreadConditionVariable:
Inheritance graph
[legend]
Collaboration diagram for madness::PthreadConditionVariable:
Collaboration graph
[legend]

Public Member Functions

 PthreadConditionVariable ()
 
pthread_mutex_t & get_pthread_mutex ()
 
void lock () const
 
void unlock () const
 
void wait () const
 You should have acquired the mutex before entering here. More...
 
void signal () const
 
void broadcast () const
 
virtual ~PthreadConditionVariable ()
 

Detailed Description

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.

Constructor & Destructor Documentation

madness::PthreadConditionVariable::PthreadConditionVariable ( )
inline
virtual madness::PthreadConditionVariable::~PthreadConditionVariable ( )
inlinevirtual

Member Function Documentation

void madness::PthreadConditionVariable::broadcast ( ) const
inline

References MADNESS_EXCEPTION.

pthread_mutex_t& madness::PthreadConditionVariable::get_pthread_mutex ( )
inline
void madness::PthreadConditionVariable::lock ( ) const
inline

References MADNESS_EXCEPTION.

void madness::PthreadConditionVariable::signal ( ) const
inline
void madness::PthreadConditionVariable::unlock ( ) const
inline

References MADNESS_EXCEPTION.

void madness::PthreadConditionVariable::wait ( ) const
inline

You should have acquired the mutex before entering here.

Referenced by madness::DQueue< madness::PoolTaskInterface * >::pop_front().


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