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. | |
| Mutex & | operator= (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 |
This class just encapsulates a pthread_mutex_t (from the pthread library).
| 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.
| bool Dwm::Pthread::Mutex::TryLock | ( | ) |
Try to lock the mutex, without blocking.
Returns true on success.