Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::core::Mutex Class Reference

Mutex. More...

#include <mutex.h>

Inheritance diagram for roc::core::Mutex:
Collaboration diagram for roc::core::Mutex:

Public Types

typedef ScopedLock< MutexLock
 RAII lock. More...
 

Public Member Functions

 Mutex ()
 Initialize mutex. More...
 
 ~Mutex ()
 Destroy mutex. More...
 
ROC_ATTR_NODISCARD bool try_lock () const
 Try to lock the mutex. More...
 
void lock () const
 Lock mutex. More...
 
void unlock () const
 Unlock mutex. More...
 

Friends

class Cond
 

Detailed Description

Mutex.

Definition at line 31 of file mutex.h.

Member Typedef Documentation

◆ Lock

RAII lock.

Definition at line 34 of file mutex.h.

Constructor & Destructor Documentation

◆ Mutex()

roc::core::Mutex::Mutex ( )

Initialize mutex.

◆ ~Mutex()

roc::core::Mutex::~Mutex ( )

Destroy mutex.

Member Function Documentation

◆ lock()

void roc::core::Mutex::lock ( ) const
inline

Lock mutex.

Definition at line 54 of file mutex.h.

◆ try_lock()

ROC_ATTR_NODISCARD bool roc::core::Mutex::try_lock ( ) const
inline

Try to lock the mutex.

Definition at line 43 of file mutex.h.

◆ unlock()

void roc::core::Mutex::unlock ( ) const
inline

Unlock mutex.

Definition at line 61 of file mutex.h.


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