|
tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications
« « « Anklang Documentation |
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.
Definition at line 23 of file tracktion_RealTimeSpinLock.h.
|
noexcept |
Takes the lock, blocking if necessary.
Definition at line 27 of file tracktion_RealTimeSpinLock.h.
|
noexcept |
Attempts to take the lock once, returning true if successful.
Definition at line 56 of file tracktion_RealTimeSpinLock.h.
|
noexcept |
Releases the lock, this should only be called after a successful call to try_lock or lock.
Definition at line 50 of file tracktion_RealTimeSpinLock.h.