VAE - Virtual Audio Engine 1
Small Data Driven Audio Engine
tklb::Mutex Class Reference

std::mutex wrapper More...

#include <TMutex.hpp>

Collaboration diagram for tklb::Mutex:

Public Types

using Lock = LockGuard< Mutex >
 
using TryLock = LockGuardTry< Mutex >
 

Public Member Functions

 Mutex (const Mutex &)=delete
 
 Mutex (const Mutex *)=delete
 
 Mutex (Mutex &&)=delete
 
Mutexoperator= (const Mutex &)=delete
 
Mutexoperator= (Mutex &&)=delete
 
 Mutex ()=default
 
void lock ()
 
void unlock ()
 
bool try_lock ()
 Tries to lock, returns true if lock was aquired. More...
 

Private Attributes

std::mutex mMutex
 

Detailed Description

std::mutex wrapper

Definition at line 11 of file TMutex.hpp.

Member Typedef Documentation

◆ Lock

Definition at line 22 of file TMutex.hpp.

◆ TryLock

Definition at line 23 of file TMutex.hpp.

Constructor & Destructor Documentation

◆ Mutex() [1/4]

tklb::Mutex::Mutex ( const Mutex )
delete

◆ Mutex() [2/4]

tklb::Mutex::Mutex ( const Mutex )
delete

◆ Mutex() [3/4]

tklb::Mutex::Mutex ( Mutex &&  )
delete

◆ Mutex() [4/4]

tklb::Mutex::Mutex ( )
default

Member Function Documentation

◆ lock()

void tklb::Mutex::lock ( )
inline

Definition at line 25 of file TMutex.hpp.

25 {
26 mMutex.lock();
27 }
std::mutex mMutex
Definition: TMutex.hpp:12

◆ operator=() [1/2]

Mutex & tklb::Mutex::operator= ( const Mutex )
delete

◆ operator=() [2/2]

Mutex & tklb::Mutex::operator= ( Mutex &&  )
delete

◆ try_lock()

bool tklb::Mutex::try_lock ( )
inline

Tries to lock, returns true if lock was aquired.

Definition at line 36 of file TMutex.hpp.

36 {
37 return mMutex.try_lock();
38 }

◆ unlock()

void tklb::Mutex::unlock ( )
inline

Definition at line 29 of file TMutex.hpp.

29 {
30 mMutex.unlock();
31 }

Member Data Documentation

◆ mMutex

std::mutex tklb::Mutex::mMutex
private

Definition at line 12 of file TMutex.hpp.


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