blocxx
Public Member Functions | Private Member Functions | Private Attributes | List of all members
BLOCXX_NAMESPACE::Mutex Class Reference

#include <Mutex.hpp>

Public Member Functions

 Mutex ()
 Create a new recursive Mutex object. More...
 
 ~Mutex ()
 Destroy this Mutex object. More...
 
void acquire ()
 Acquire ownership of this Mutex object. More...
 
bool release ()
 Release ownership of this Mutex object. More...
 

Private Member Functions

 Mutex (const Mutex &)
 
Mutexoperator= (const Mutex &)
 

Private Attributes

Mutex_t m_mutex
 

Detailed Description

Definition at line 77 of file Mutex.hpp.

Constructor & Destructor Documentation

◆ Mutex() [1/2]

BLOCXX_NAMESPACE::Mutex::Mutex ( )

Create a new recursive Mutex object.

Definition at line 79 of file Mutex.cpp.

References BLOCXX_THROW, m_mutex, and BLOCXX_NAMESPACE::MutexImpl::releaseMutex().

◆ ~Mutex()

BLOCXX_NAMESPACE::Mutex::~Mutex ( )

Destroy this Mutex object.

Definition at line 86 of file Mutex.cpp.

◆ Mutex() [2/2]

BLOCXX_NAMESPACE::Mutex::Mutex ( const Mutex )
private

Member Function Documentation

◆ acquire()

void BLOCXX_NAMESPACE::Mutex::acquire ( )

Acquire ownership of this Mutex object.

This call will block if another thread has ownership of this Mutex. When it returns, the current thread will be the owner of this Mutex object.

Definition at line 99 of file Mutex.cpp.

◆ operator=()

Mutex& BLOCXX_NAMESPACE::Mutex::operator= ( const Mutex )
private

◆ release()

bool BLOCXX_NAMESPACE::Mutex::release ( )

Release ownership of this Mutex object.

If another thread is waiting to acquire the ownership of this mutex it will stop blocking and acquire ownership when this call returns.

Definition at line 109 of file Mutex.cpp.

Member Data Documentation

◆ m_mutex

Mutex_t BLOCXX_NAMESPACE::Mutex::m_mutex
private

Definition at line 132 of file Mutex.hpp.

Referenced by Mutex().


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