MADNESS  0.10.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
madness::RecursiveMutex Class Reference

Recursive mutex using pthread mutex operations. More...

#include <worldmutex.h>

Public Member Functions

 RecursiveMutex ()
 Make and initialize a mutex ... initial state is unlocked. More...
 
 ~RecursiveMutex ()
 
void lock () const
 Acquire the mutex waiting if necessary. More...
 
pthread_mutex_t * ptr () const
 Return a pointer to the pthread mutex for use by a condition variable. More...
 
bool try_lock () const
 Try to acquire the mutex ... return true on success, false on failure. More...
 
void unlock () const
 Free a mutex owned by this thread. More...
 

Private Member Functions

 RecursiveMutex (const RecursiveMutex &)
 Copy constructor is forbidden. More...
 
void operator= (const RecursiveMutex &)
 Assignment is forbidden. More...
 

Private Attributes

pthread_mutex_t mutex
 

Detailed Description

Recursive mutex using pthread mutex operations.

Constructor & Destructor Documentation

◆ RecursiveMutex() [1/2]

madness::RecursiveMutex::RecursiveMutex ( const RecursiveMutex )
private

Copy constructor is forbidden.

◆ RecursiveMutex() [2/2]

madness::RecursiveMutex::RecursiveMutex ( )

Make and initialize a mutex ... initial state is unlocked.

References MADNESS_EXCEPTION, and mutex.

◆ ~RecursiveMutex()

madness::RecursiveMutex::~RecursiveMutex ( )
inline

References mutex.

Member Function Documentation

◆ lock()

void madness::RecursiveMutex::lock ( ) const
inline

◆ operator=()

void madness::RecursiveMutex::operator= ( const RecursiveMutex )
private

Assignment is forbidden.

◆ ptr()

pthread_mutex_t* madness::RecursiveMutex::ptr ( ) const
inline

Return a pointer to the pthread mutex for use by a condition variable.

References mutex.

◆ try_lock()

bool madness::RecursiveMutex::try_lock ( ) const
inline

Try to acquire the mutex ... return true on success, false on failure.

References mutex.

◆ unlock()

void madness::RecursiveMutex::unlock ( ) const
inline

Member Data Documentation

◆ mutex

pthread_mutex_t madness::RecursiveMutex::mutex
mutableprivate

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