#include <BoundedThreadPool.hpp>
Public Types | |
enum | { defaultMinThreads = 0, defaultMaxThreads = 5, defaultGracefulTermination = 1 } |
Public Member Functions | |
Configurator () | |
Constructs Configurator with default values used by BoundedThreadPool. | |
unsigned int | minThreads () const |
Returns current value of minimum threads configuration parameter. | |
Configurator & | minThreads (unsigned int minThreads) |
Sets the value of minimum threads configuration parameter. | |
unsigned int | maxThreads () const |
Returns current value of maximum threads configuration parameter. | |
Configurator & | maxThreads (unsigned int maxThreads) |
Sets the value of maximum threads configuration parameter. | |
bool | gracefulTermination () const |
Returns current value of graceful termination configuration parameter. | |
Configurator & | gracefulTermination (bool gracefulTermination) |
Sets the value of graceful termination configuration parameter. |
Use Configurator class to pass configuration parameters when creating objects of type BoundedThreadPool. Instance of Configurator class can directly be passed to Scheduler's constructor to customize the behavior of the Executor. BoundedThreadPool uses the following default values:
|
Constructs Configurator with default values used by BoundedThreadPool.
|
|
Sets the value of
|
|
Returns current value of
|
|
Sets the value of
|
|
Returns current value of
|
|
Sets the value of
|
|
Returns current value of
|