libDwm-0.6.0
Dwm::Pthread::Mutex Class Reference

This class just encapsulates a pthread_mutex_t (from the pthread library). More...

#include <DwmMutex.hh>

Public Member Functions

 Mutex ()
 Constructor. Initializes the mutex.
 
 ~Mutex ()
 Constructor. Destroys the mutex.
 
 Mutex (const Mutex &mutex)
 Copy constructor.
 
Mutexoperator= (const Mutex &mutex)
 operator =
 
bool Lock ()
 Lock the mutex. More...
 
bool TryLock ()
 Try to lock the mutex, without blocking. More...
 
bool Unlock ()
 Unlock the mutex. Returns true on success.
 

Protected Attributes

STD_SHARED_PTR< Wrapper > _mutex
 

Friends

class ConditionVariable
 

Detailed Description

This class just encapsulates a pthread_mutex_t (from the pthread library).

Member Function Documentation

◆ Lock()

bool Dwm::Pthread::Mutex::Lock ( )

Lock the mutex.

This is a blocking call; it will not return until the mutex has been locked. Returns true on success.

◆ TryLock()

bool Dwm::Pthread::Mutex::TryLock ( )

Try to lock the mutex, without blocking.

Returns true on success.


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