|
The Joe Engine
Joe's engine programming playground
|
The JEThreadPool class. More...
#include <ThreadPool.h>
Public Member Functions | |
| JEThreadPool () | |
| Constructor. More... | |
| ~JEThreadPool () | |
| Destructor. More... | |
| void | EnqueueJob (JEThreadJob job) |
| Enqueue thread job. More... | |
The JEThreadPool class.
Class that manages any number of threads and a queue of tasks to complete. Threads are created and launched upon construction. Threads run in an infinite loop, block until the queue is populated with a task (or multiple), then execute the task.
|
inline |
Constructor.
Creates and launches all threads in the pool.
|
inline |
Destructor.
Joins threads.
| void JoeEngine::JEThreadPool::EnqueueJob | ( | JEThreadJob | job | ) |
Enqueue thread job.
Synchronously add a new thread job to the job queue.
| job | the job to enqueue. |