TTKMusicPlayer  4.2.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Public Member Functions | Private Attributes | List of all members
TTKSpinLock Class Reference

The class of the spin lock. More...

#include <ttkspinlock.h>

Public Member Functions

 TTKSpinLock ()=default
 
void lock () noexcept
 
bool try_lock () noexcept
 
void unlock () noexcept
 

Private Attributes

std::atomic_flag m_lock = ATOMIC_FLAG_INIT
 

Detailed Description

The class of the spin lock.

Author
Greedysky greed.nosp@m.ysky.nosp@m.@163..nosp@m.com

Definition at line 28 of file ttkspinlock.h.

Constructor & Destructor Documentation

TTKSpinLock::TTKSpinLock ( )
default

Member Function Documentation

void TTKSpinLock::lock ( )
inlinenoexcept

Definition at line 34 of file ttkspinlock.h.

bool TTKSpinLock::try_lock ( )
inlinenoexcept

Definition at line 43 of file ttkspinlock.h.

void TTKSpinLock::unlock ( )
inlinenoexcept

Definition at line 48 of file ttkspinlock.h.

Member Data Documentation

std::atomic_flag TTKSpinLock::m_lock = ATOMIC_FLAG_INIT
private

Definition at line 54 of file ttkspinlock.h.


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