iMSTK
Interactive Medical Simulation Toolkit
|
#include <imstkSpinLock.h>
Public Member Functions | |
SpinLock () | |
Default constructor, initializes the atomic_flag member to memory_order_release state. | |
SpinLock (const SpinLock &) | |
Copy constructor, must be implemented as an empty function because the member variable of type std::atomic_flag has copy constructor deleted. In addition, the constructor initializes the atomic_flag member to memory_order_release state. | |
void | lock () |
Start a thread-safe region, where only one thread can execute at a time until a call to the unlock function. | |
void | unlock () |
End a thread-safe region. | |
The SpinLock class.
A SpinLock is a light weight mutex, which can be safely locked and unlocked exclusively by only one thread at a time
Definition at line 20 of file imstkSpinLock.h.