Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::IOTaskList Class Reference

#include <io_tasklist.h>

Public Member Functions

 IOTaskList (uint32_t)
 
 ~IOTaskList ()
 
void process ()
 
void push_back (std::function< void()> fn)
 

Private Member Functions

void io_thread ()
 

Static Private Member Functions

static void * _worker_thread (void *)
 

Private Attributes

std::vector< std::function< void()> > _tasks
 
uint32_t _n_threads
 
std::atomic< uint32_t > _n_workers
 
std::vector< pthread_t > _workers
 
std::atomic< bool > _terminate
 
PBD::Semaphore _exec_sem
 
PBD::Semaphore _idle_sem
 
Glib::Threads::Mutex _tasks_mutex
 

Detailed Description

Definition at line 33 of file io_tasklist.h.

Constructor & Destructor Documentation

◆ IOTaskList()

ARDOUR::IOTaskList::IOTaskList ( uint32_t  )

◆ ~IOTaskList()

ARDOUR::IOTaskList::~IOTaskList ( )

Member Function Documentation

◆ _worker_thread()

static void* ARDOUR::IOTaskList::_worker_thread ( void *  )
staticprivate

◆ io_thread()

void ARDOUR::IOTaskList::io_thread ( )
private

◆ process()

void ARDOUR::IOTaskList::process ( )

process tasks in list in parallel, wait for them to complete

◆ push_back()

void ARDOUR::IOTaskList::push_back ( std::function< void()>  fn)

Member Data Documentation

◆ _exec_sem

PBD::Semaphore ARDOUR::IOTaskList::_exec_sem
private

Definition at line 54 of file io_tasklist.h.

◆ _idle_sem

PBD::Semaphore ARDOUR::IOTaskList::_idle_sem
private

Definition at line 55 of file io_tasklist.h.

◆ _n_threads

uint32_t ARDOUR::IOTaskList::_n_threads
private

Definition at line 50 of file io_tasklist.h.

◆ _n_workers

std::atomic<uint32_t> ARDOUR::IOTaskList::_n_workers
private

Definition at line 51 of file io_tasklist.h.

◆ _tasks

std::vector<std::function<void ()> > ARDOUR::IOTaskList::_tasks
private

Definition at line 48 of file io_tasklist.h.

◆ _tasks_mutex

Glib::Threads::Mutex ARDOUR::IOTaskList::_tasks_mutex
private

Definition at line 56 of file io_tasklist.h.

◆ _terminate

std::atomic<bool> ARDOUR::IOTaskList::_terminate
private

Definition at line 53 of file io_tasklist.h.

◆ _workers

std::vector<pthread_t> ARDOUR::IOTaskList::_workers
private

Definition at line 52 of file io_tasklist.h.


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