MPMA Framework 0.4
|
Used to lock/unlock a spinlock automatically using scope. The lock is released on destruction. More...
#include <Locks.h>
Public Member Functions | |
TakeSpinLock (SpinLock &slock, bool takeNow=true) | |
Optionally takes the lock. | |
~TakeSpinLock () | |
Releases the lock if it is currently taken. | |
void | Take () |
Manually takes the lock. (If already taken by this TakeSpinLock instance, the call is ignored) | |
void | Leave () |
Manually releases the lock. (If not taken by this TakeSpinLock instance, the call is ignored) |
Used to lock/unlock a spinlock automatically using scope. The lock is released on destruction.