Lumiera
0.pre.03
»edit your freedom«
|
#include "vault/gear/work-force.hpp"
Base for configuration of the worker pool.
In real usage, a subclass of #Config is used, which additionally defines the two required functors
doWork
: perform a piece of work and return control codefinalHook
: callback invoked at work thread termination Obviously these two functors are defined in a way to call into the actual implementation of work management (i.e. the Scheduler). Definition at line 113 of file work-force.hpp.
Static Public Member Functions | |
static size_t | getDefaultComputationCapacity () |
default value for full computing capacity is to use all (virtual) cores. | |
Static Public Attributes | |
static size_t | COMPUTATION_CAPACITY = Config::getDefaultComputationCapacity() |
Nominal »full size« of a pool of concurrent workers. More... | |
Public Attributes | |
const size_t | DISMISS_CYCLES = 100 |
number of idle cycles after which the worker terminates | |
const milliseconds | IDLE_WAIT = 20ms |
wait period when a worker falls idle | |
|
static |
Nominal »full size« of a pool of concurrent workers.
This value is initialised to use all available concurrent computing cores, but can be adjusted. Adjustments should be done before a worker pool scales up.
Definition at line 115 of file work-force.hpp.
Referenced by Scheduler::connectMonitoring(), SchedulerStress_test::investigateWorkProcessing(), BreakingPoint< CONF >::perform(), ParameterRange< CONF >::perform(), WorkForce_test::verify_defaultPool(), WorkForce_test::verify_finalHook(), SchedulerStress_test::verify_instrumentation(), and WorkForce_test::verify_scalePool().