![]() |
Nazara Engine
0.4
A fast, complete, cross-platform API designed for game development
|
Core class that represents a binary semaphore, a mutex. More...
Public Member Functions | |
| Mutex () | |
| Constructs a Mutex object by default. | |
| Mutex (const Mutex &)=delete | |
| Mutex (Mutex &&) noexcept=default | |
| ~Mutex () | |
| Destructs the object. | |
| void | Lock () |
| Locks the mutex. More... | |
| bool | TryLock () |
| Tries to lock the mutex. More... | |
| void | Unlock () |
| Unlocks the mutex. More... | |
| Mutex & | operator= (const Mutex &)=delete |
| Mutex & | operator= (Mutex &&) noexcept=default |
Friends | |
| class | ConditionVariable |
Core class that represents a binary semaphore, a mutex.
| void Nz::Mutex::Lock | ( | ) |
Locks the mutex.
If another thread has already locked the mutex, a call to lock will block execution until the lock is acquired. A thread may call lock on a recursive mutex repeatedly. Ownership will only be released after the thread makes a matching number of calls to unlock
| bool Nz::Mutex::TryLock | ( | ) |
Tries to lock the mutex.
| void Nz::Mutex::Unlock | ( | ) |