|
DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
|
Lightweight spin lock for real-time audio thread synchronisation. More...
#include <atomic>

Go to the source code of this file.
Classes | |
| class | dspark::SpinLock |
| A minimal, real-time safe spin lock with a TTAS wait loop. More... | |
| class | dspark::SpinLock::ScopedLock |
| RAII wrapper that acquires the lock on construction and releases on destruction. More... | |
| class | dspark::SpinLock::ScopedTryLock |
| RAII wrapper that tries to acquire the lock without blocking. More... | |
Namespaces | |
| namespace | dspark |
| Main namespace for the DSPark framework. | |
Macros | |
| #define | DSPARK_SPIN_PAUSE() ((void)0) |
Lightweight spin lock for real-time audio thread synchronisation.
A busy-wait mutex built on std::atomic_flag. Designed for protecting very short critical sections (a few assignments) where sleeping would introduce unacceptable latency: typically parameter hand-off between a GUI thread and the audio thread.
Dependencies: C++20 standard library only (<atomic>).
Definition in file SpinLock.h.
| #define DSPARK_SPIN_PAUSE | ( | ) | ((void)0) |
Definition at line 54 of file SpinLock.h.