Lumiera  0.pre.03
»edit your freedom«
Config Struct Reference

#include "vault/gear/work-force.hpp"

Description

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 code
  • finalHook : 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 104 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
 

Member Data Documentation

◆ COMPUTATION_CAPACITY

size_t COMPUTATION_CAPACITY = Config::getDefaultComputationCapacity()
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.

Warning
this value is taken as-is; setting it to zero will disable many (but not all) aspects of concurrent processing.

Definition at line 106 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().

+ Inheritance diagram for Config:
+ Collaboration diagram for Config:

The documentation for this struct was generated from the following files: