Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
roc::core::Thread Class Referenceabstract

Base class for thread objects. More...

#include <roc_core/target_posix/roc_core/thread.h>

Inheritance diagram for roc::core::Thread:

Public Member Functions

bool is_joinable () const
 Check if thread was started and can be joined. More...
 
bool start ()
 Start thread. More...
 
void join ()
 Join thread. More...
 

Static Public Member Functions

static uint64_t get_pid ()
 Get numeric identifier of current process. More...
 
static uint64_t get_tid ()
 Get numeric identifier of current thread. More...
 
static bool enable_realtime ()
 Raise current thread priority to realtime. More...
 

Protected Member Functions

virtual void run ()=0
 Method to be executed in thread. More...
 

Detailed Description

Base class for thread objects.

Definition at line 27 of file thread.h.

Member Function Documentation

◆ enable_realtime()

static bool roc::core::Thread::enable_realtime ( )
static

Raise current thread priority to realtime.

◆ get_pid()

static uint64_t roc::core::Thread::get_pid ( )
static

Get numeric identifier of current process.

◆ get_tid()

static uint64_t roc::core::Thread::get_tid ( )
static

Get numeric identifier of current thread.

◆ is_joinable()

bool roc::core::Thread::is_joinable ( ) const

Check if thread was started and can be joined.

Returns
true if start() was called and join() was not called yet.

◆ join()

void roc::core::Thread::join ( )

Join thread.

Remarks
Blocks until run() returns and thread terminates.

◆ run()

virtual void roc::core::Thread::run ( )
protectedpure virtual

Method to be executed in thread.

◆ start()

bool roc::core::Thread::start ( )

Start thread.

Remarks
Executes run() in new thread.

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