|
Ream v0.1.0-1
C++ graphics library for Linux
|
RAII guard that serializes access to Ream's global lock. More...
#include <RLockGuard.h>
Public Member Functions | |
| RLockGuard () noexcept | |
| Acquires the global lock for the duration of this scope. | |
| ~RLockGuard () noexcept | |
| Releases the lock if this guard acquired it. | |
Static Public Member Functions | |
| static bool | Lock () noexcept |
| Locks the global mutex for the calling thread. | |
| static bool | Unlock () noexcept |
| Unlocks the global mutex previously acquired by the calling thread. | |
RAII guard that serializes access to Ream's global lock.
The lock is recursive per-thread: acquiring it while the current thread already holds it is a no-op, and only the outermost guard releases it on destruction.
|
inlinenoexcept |
Acquires the global lock for the duration of this scope.
|
inlinenoexcept |
Releases the lock if this guard acquired it.
|
staticnoexcept |
Locks the global mutex for the calling thread.
true if the lock was acquired, false if the current thread already held it.
|
staticnoexcept |
Unlocks the global mutex previously acquired by the calling thread.
true if the lock was released, false if the current thread did not hold it.