21#ifndef INCLUDE_OLA_THREAD_THREADPOOL_H_
22#define INCLUDE_OLA_THREAD_THREADPOOL_H_
26#include <ola/thread/ConsumerThread.h>
27#include <ola/thread/Thread.h>
38 explicit ThreadPool(
unsigned int thread_count)
39 : m_thread_count(thread_count),
48 std::queue<Action> m_callback_queue;
49 unsigned int m_thread_count;
53 std::vector<ConsumerThread*> m_threads;
55 void JoinAllThreads();
57 ThreadPool(
const ThreadPool &) =
delete;
58 const ThreadPool &operator=(
const ThreadPool &) =
delete;
The base class for all 0 argument callbacks.
Definition Callback.h:119
~ThreadPool()
Definition ThreadPool.cpp:33
void JoinAll()
Definition ThreadPool.cpp:68
void Execute(Action action)
Definition ThreadPool.cpp:78
bool Init()
Definition ThreadPool.cpp:41
Threads and synchronization mechanisms.
Definition ConsumerThread.cpp:25
The namespace containing all OLA symbols.
Definition Credentials.cpp:44