Open Lighting Architecture: ola::thread::ThreadPool Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
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

## ◆ ~ThreadPool()

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

Clean up

## Member Function Documentation

## ◆ Execute()

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.

## ◆ Init()

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

Start the threads

## ◆ JoinAll()

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

Join all threads

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

- include/ola/thread/ThreadPool.h
- common/thread/ThreadPool.cpp