Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | List of all members
ola::thread::ThreadPool Class Reference

Public Types

typedef ola::BaseCallback0
< void > * 
Action
 

Public Member Functions

 ThreadPool (unsigned int thread_count)
 
 ~ThreadPool ()
 
bool Init ()
 
void JoinAll ()
 
void Execute (Action action)
 

Constructor & Destructor Documentation

ola::thread::ThreadPool::~ThreadPool ( )

Clean up

Member Function Documentation

void ola::thread::ThreadPool::Execute ( Action  action)

Queue the callback. Don't call this after JoinAll() otherwise the closure may not run and will probably leak memory.

bool ola::thread::ThreadPool::Init ( )

Start the threads

void ola::thread::ThreadPool::JoinAll ( )

Join all threads


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