TracktionEngine
|
A basic spin lock that uses an atomic_flag to store the locked state so should never result in a system call. More...
#include <tracktion_RealTimeSpinLock.h>
Public Member Functions | |
void | lock () noexcept |
Takes the lock, blocking if necessary. | |
void | unlock () noexcept |
Releases the lock, this should only be called after a successful call to try_lock or lock. | |
bool | try_lock () noexcept |
Attempts to take the lock once, returning true if successful. | |
A basic spin lock that uses an atomic_flag to store the locked state so should never result in a system call.
Note that only try_lock should be called from a real-time thread. If you can't take the lock you should exit quickly.
|
noexcept |
Takes the lock, blocking if necessary.
References try_lock().
|
noexcept |
Releases the lock, this should only be called after a successful call to try_lock or lock.
Referenced by tracktion::graph::LockFreeObject< ObjectType >::releaseRealTime().
|
noexcept |
Attempts to take the lock once, returning true if successful.
Referenced by lock(), and tracktion::graph::LockFreeObject< ObjectType >::retainRealTime().