DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::SpinLock::ScopedLock Class Reference

RAII wrapper that acquires the lock on construction and releases on destruction. More...

#include <SpinLock.h>

Public Member Functions

 ScopedLock (SpinLock &spinLock) noexcept
 Constructs the guard and blocks until the lock is acquired.
 
 ~ScopedLock () noexcept
 Destructs the guard and releases the lock.
 
 ScopedLock (const ScopedLock &)=delete
 
ScopedLock & operator= (const ScopedLock &)=delete
 

Detailed Description

RAII wrapper that acquires the lock on construction and releases on destruction.

Definition at line 142 of file SpinLock.h.

Constructor & Destructor Documentation

◆ ScopedLock() [1/2]

dspark::SpinLock::ScopedLock::ScopedLock ( SpinLock &  spinLock)
inlineexplicitnoexcept

Constructs the guard and blocks until the lock is acquired.

Parameters
spinLockThe SpinLock to manage.

Definition at line 149 of file SpinLock.h.

◆ ~ScopedLock()

dspark::SpinLock::ScopedLock::~ScopedLock ( )
inlinenoexcept

Destructs the guard and releases the lock.

Definition at line 152 of file SpinLock.h.

◆ ScopedLock() [2/2]

dspark::SpinLock::ScopedLock::ScopedLock ( const ScopedLock &  )
delete

Member Function Documentation

◆ operator=()

ScopedLock & dspark::SpinLock::ScopedLock::operator= ( const ScopedLock &  )
delete

The documentation for this class was generated from the following file: