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

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

Description

template<class CONF>
class vault::gear::work::Worker< CONF >

Individual worker thread: repeatedly pulls the doWork functor.

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

Public Member Functions

 Worker (CONF config)
 
bool isDead () const
 this Worker starts out active, but may terminate
 

Public Attributes

std::atomic< bool > emergency {false}
 emergency break to trigger cooperative halt
 

Private Member Functions

activity::Proc contentionWait ()
 
activity::Proc idleWait ()
 
void pullWork ()
 
- Private Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Private Attributes

size_t idleCycles_ {0}
 
size_t kickLevel_ {0}
 
size_t randFact_ {0}
 
lib::Thread thread_
 
+ Inheritance diagram for Worker< CONF >:
+ Collaboration diagram for Worker< CONF >:

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