#include <BoundedThreadPool.hpp>
Public Types | |
typedef BoundedThreadPool< Q > | OfType |
typedef Q::Task | Task |
typedef Q | Queue |
Public Member Functions | |
BoundedThreadPool () | |
Constructs BoundedThreadPool with default configurator. | |
BoundedThreadPool (const OfType &exec) | |
Constructs BoundedThreadPool using configuration from passed BoundedThreadPool object. | |
BoundedThreadPool (const Configurator &config) | |
Constructs BoundedThreadPool using supplied configuration object. | |
~BoundedThreadPool () | |
Destructs instance of BoundedThreadPool object. | |
void | setUp (Queue *queuePtr) |
Initializes execution environemnt. | |
void | operator() (const Task &task) |
Pass-through for tasks that will be put on the Queue. |
Use BoundedThreadPool class to create objects that will serve as bounded task executors. Executor communicates with the Queue to pick up pending tasks and assigns threads for tasks execution. Additionally, it manages a pool of threads to further minimize system resources needed for executing multiple tasks.
|
Constructs BoundedThreadPool using configuration from passed BoundedThreadPool object.
|
|
Constructs BoundedThreadPool using supplied configuration object.
|
|
Destructs instance of BoundedThreadPool object. It waits for each worker thread to exit before returning.
|
|
Pass-through for tasks that will be put on the Queue.
|
|
Initializes execution environemnt.
Called just before Scheduler begins queing tasks. It may create warm threads if
|