#include <PoolExecutor.h>
Inheritance diagram for PoolExecutor:
Public Methods | |
PoolExecutor (unsigned int min) | |
PoolExecutor (unsigned int min, unsigned int max) | |
void | setMax (unsigned int max) |
void | setMin (unsigned int) |
unsigned int | getMax () |
unsigned int | getMin () |
virtual | ~PoolExecutor () throw () |
Destroy a new PoolExecutor. | |
virtual void | execute (const RunnableHandle &task) |
void | execute (Runnable *task) |
virtual void | cancel () |
virtual bool | isCanceled () |
virtual void | wait () |
virtual bool | wait (unsigned long timeout) |
Submitting a NullTask will allow you to wait() for all real tasks being executed to complete; and not just to be serviced (started).
|
Create a new PoolExecutor
|
|
Create a new PoolExecutor
|
|
Implements Executor. |
|
Convience method
Reimplemented from Executor. |
|
Submit a light wieght task to an Executor. This will not block the calling thread very long. The submitted task will be executed at some later point by another thread.
Implements Executor. |
|
Get the current maximum number of threads
|
|
Get the current minimum number of threads
|
|
Implements Cancelable. |
|
Change the maximum number of threads in the pool. As tasks are added to the Executor, more threads will be added as needed - up to the maximum number of worker threads set.
|
|
Change the minimum number of threads in the pool. When currently running tasks complete, and the Thread executing the task completes it can be removed. A Thread will never be instantly canceled because the minimum number of threads has changed. It is a gradual decline in the number of worker threads, they are canceled lazily.
|
|
Implements Executor. |
|
Implements Executor. |