DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
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
 
ScopedLockoperator= (const ScopedLock &)=delete
 

Detailed Description

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

Definition at line 135 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 142 of file SpinLock.h.

◆ ~ScopedLock()

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

Destructs the guard and releases the lock.

Definition at line 145 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: