struct SpinLock : public Moveable<SpinLock>
Lightweight busywaiting synchronization lock. Unlike Mutex, SpinLock waits in a loop until resource becomes available, thus avoiding costs of contention system context switch at the price of active waiting. SpinLock methods are also usually inlined (and trivial). SpinLock is not reentrant and also not fair (if more threads are waiting on the same SpinLock, the order of acquiring it is not specified).
Tries to acquire lock, returns true of lock acquired.
class Lock : private NoCopy
This nested class automates calls to Mutex::Enter / Mutex::Leave for block of code using C++ constructor / destructor rules. Using operator StaticMutex::Mutex, it can be used with StaticMutex as well.
Constructor / Destructor detail
Performs s.Leave() where s is the constructor parameter.