|
DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
|
RAII wrapper that tries to acquire the lock without blocking. More...
#include <SpinLock.h>
Public Member Functions | |
| ScopedTryLock (SpinLock &spinLock) noexcept | |
| Constructs the guard and attempts a single lock acquisition. | |
| ~ScopedTryLock () noexcept | |
| Destructs the guard and releases the lock ONLY if it was successfully acquired. | |
| bool | isLocked () const noexcept |
| Queries whether the lock acquisition was successful. | |
| ScopedTryLock (const ScopedTryLock &)=delete | |
| ScopedTryLock & | operator= (const ScopedTryLock &)=delete |
RAII wrapper that tries to acquire the lock without blocking.
Check isLocked() before accessing the protected resource. Essential for reading shared data safely within the real-time audio thread.
Definition at line 161 of file SpinLock.h.
|
inlineexplicitnoexcept |
Constructs the guard and attempts a single lock acquisition.
| spinLock | The SpinLock to attempt to manage. |
Definition at line 168 of file SpinLock.h.
|
inlinenoexcept |
Destructs the guard and releases the lock ONLY if it was successfully acquired.
Definition at line 172 of file SpinLock.h.
|
delete |
|
inlinenoexcept |
Queries whether the lock acquisition was successful.
Definition at line 178 of file SpinLock.h.
|
delete |