![]() |
Public API Reference |
General mutex class. More...
#include <csutil/threading/mutex.h>
Public Member Functions | |
| bool | Lock () |
| Acquire lock on mutex. | |
| MutexImpl () | |
| Initialize an initially unlocked mutex. | |
| bool | TryLock () |
| Try to acquire lock on mutex. | |
| void | Unlock () |
| Unlock the mutex. | |
| ~MutexImpl () | |
| Destroy mutex. | |
General mutex class.
A mutex is a mutual exclusion object, it stops two threads from having it locked at the same time. A thread can get the lock by calling Lock or TryLock, and release it by calling Unlock.
Users are advised to use the ScopedLock helper class.
| CS::Threading::MutexImpl< BaseMutex >::MutexImpl | ( | ) | [inline] |
| CS::Threading::MutexImpl< BaseMutex >::~MutexImpl | ( | ) | [inline] |
| bool CS::Threading::MutexImpl< BaseMutex >::Lock | ( | ) | [inline] |
| bool CS::Threading::MutexImpl< BaseMutex >::TryLock | ( | ) | [inline] |
| void CS::Threading::MutexImpl< BaseMutex >::Unlock | ( | ) | [inline] |