Lumiera  0.pre.03
»edit your freedom«
WorkForce< CONF > Class Template Reference

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

Description

template<class CONF>
class vault::gear::WorkForce< CONF >

Pool of worker threads for rendering.

Note
the
Template Parameters
CONFconfiguration/policy base must define:
  • doWork - the work-functor (with #SIG_WorkFun)
  • finalHook - called at thread exit
See also
WorkForce_test
SchedulerCommutator

Definition at line 240 of file work-force.hpp.

Public Member Functions

 WorkForce (CONF config)
 
void activate (double degree=1.0)
 Activate or scale up the worker pool. More...
 
void awaitShutdown ()
 
void incScale (uint step=+1)
 
size_t size () const
 

Private Types

using Pool = std::list< work::Worker< CONF > >
 

Private Attributes

CONF setup_
 
Pool workers_
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Member Function Documentation

◆ activate()

void activate ( double  degree = 1.0)
inline

Activate or scale up the worker pool.

Parameters
degreefraction of the full #COMPUTATION_CAPACITY to activate
Note
will always activate at least one worker; will never scale down; setting values > 1.0 leads to over-provisioning...

Definition at line 271 of file work-force.hpp.

+ Inheritance diagram for WorkForce< CONF >:
+ Collaboration diagram for WorkForce< CONF >:

The documentation for this class was generated from the following file: