Core class that represents a mutex wrapper that provides a convenient RAII-style mechanism.
More...
Core class that represents a mutex wrapper that provides a convenient RAII-style mechanism.
◆ LockGuard()
Nz::LockGuard::LockGuard |
( |
Mutex & |
mutex, |
|
|
bool |
lock = true |
|
) |
| |
|
inline |
Constructs a LockGuard object with a mutex.
- Parameters
-
mutex | Mutex to lock |
lock | Should the mutex be locked by the constructor |
◆ Lock()
void Nz::LockGuard::Lock |
( |
| ) |
|
|
inline |
◆ TryLock()
bool Nz::LockGuard::TryLock |
( |
| ) |
|
|
inline |
Tries to lock the underlying mutex.
- See also
- Mutex::TryLock
- Returns
- true if the lock was acquired successfully
◆ Unlock()
void Nz::LockGuard::Unlock |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following files:
- include/Nazara/Core/LockGuard.hpp
- include/Nazara/Core/LockGuard.inl