Read only lock guard. More...
#include <readwritespinlock.h>
Public Types | |
typedef T | mutex_type |
This allows other code to use the type of this mutex in a more safe way. | |
Public Member Functions | |
ReadOnlyLockGuard (mutex_type &aMutex) | |
The constructor locks the mutex. More... | |
~ReadOnlyLockGuard () | |
The destructor unlocks the mutex. | |
Read only lock guard.
The constructor locks the mutex, and the destructor unlocks the mutex, so the mutex will automatically be unlocked when the lock guard goes out of scope. Example usage:
Definition at line 142 of file readwritespinlock.h.
|
inlineexplicit |
The constructor locks the mutex.
aMutex | Any mutex which implements lock() and unlock(). |
Definition at line 156 of file readwritespinlock.h.