15 #include <condition_variable> 37 void workerThreadRunner();
39 std::thread workerThread;
40 std::mutex taskDequeMutex;
41 std::condition_variable cv;
42 std::deque<Task *> taskDeque;
43 bool isRunning =
true;
~WorkerThread()
Definition: WorkerThread.cpp:8
WorkerThread()
Definition: WorkerThread.cpp:3
A class that spawns an Executor Thread (or worker thread). The thread is used for handling intensive ...
Definition: WorkerThread.h:25
A task is an object that wraps the code to run on an thread.
Definition: Task.h:18
void runOnWorker(Task *task)
Adds a new task to the queue. It will be deleted when done.
Definition: WorkerThread.cpp:43