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

Condition variable. More...

#include <cond.h>

Inheritance diagram for roc::core::Cond:
Collaboration diagram for roc::core::Cond:

Public Member Functions

 Cond (const Mutex &mutex)
 Initialize. More...
 
 ~Cond ()
 Destroy. More...
 
ROC_ATTR_NODISCARD bool timed_wait (nanoseconds_t timeout) const
 Wait with timeout. More...
 
void wait () const
 Wait. More...
 
void signal () const
 Wake up one pending waits. More...
 
void broadcast () const
 Wake up all pending waits. More...
 

Detailed Description

Condition variable.

Definition at line 28 of file cond.h.

Constructor & Destructor Documentation

◆ Cond()

roc::core::Cond::Cond ( const Mutex mutex)

Initialize.

◆ ~Cond()

roc::core::Cond::~Cond ( )

Destroy.

Member Function Documentation

◆ broadcast()

void roc::core::Cond::broadcast ( ) const

Wake up all pending waits.

◆ signal()

void roc::core::Cond::signal ( ) const

Wake up one pending waits.

◆ timed_wait()

ROC_ATTR_NODISCARD bool roc::core::Cond::timed_wait ( nanoseconds_t  timeout) const

Wait with timeout.

Returns
false if timeout expired.

◆ wait()

void roc::core::Cond::wait ( ) const

Wait.


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