![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "vault/gear/work-force.hpp"
Individual worker thread: repeatedly pulls the doWork functor.
Definition at line 127 of file work-force.hpp.
Public Attributes | |
| std::atomic< bool > | emergency {false} |
| emergency break to trigger cooperative halt | |
Public Member Functions | |
| Worker (CONF config) | |
| bool | isDead () const |
| this Worker starts out active, but may terminate | |
Private Member Functions | |
| void | pullWork () |
| activity::Proc | idleWait () |
| activity::Proc | contentionWait () |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
Private Attributes | |
| lib::Thread | thread_ |
| size_t | idleCycles_ {0} |
| size_t | kickLevel_ {0} |
| size_t | randFact_ {0} |
|
inline |
Definition at line 132 of file work-force.hpp.
|
inline |
this Worker starts out active, but may terminate
Definition at line 143 of file work-force.hpp.
References Worker< CONF >::thread_.
|
inlineprivate |
Definition at line 150 of file work-force.hpp.
References ASSERT_MEMBER_FUNCTOR, Worker< CONF >::contentionWait(), Worker< CONF >::emergency, ERROR_LOG_AND_IGNORE, Worker< CONF >::idleCycles_, Worker< CONF >::idleWait(), vault::gear::activity::KICK, Worker< CONF >::kickLevel_, vault::gear::activity::PASS, and vault::gear::activity::WAIT.
Here is the call graph for this function:
|
inlineprivate |
Definition at line 187 of file work-force.hpp.
References vault::gear::activity::HALT, Worker< CONF >::idleCycles_, and vault::gear::activity::PASS.
Referenced by Worker< CONF >::pullWork().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 202 of file work-force.hpp.
References Worker< CONF >::kickLevel_, util::min(), vault::gear::activity::PASS, vault::gear::work::performRandomisedSpin(), Worker< CONF >::randFact_, and vault::gear::work::steppedRandDelay().
Referenced by Worker< CONF >::pullWork().
Here is the call graph for this function:
Here is the caller graph for this function:| std::atomic<bool> emergency {false} |
emergency break to trigger cooperative halt
Definition at line 140 of file work-force.hpp.
Referenced by Worker< CONF >::pullWork().
|
private |
Definition at line 147 of file work-force.hpp.
Referenced by Worker< CONF >::isDead().
|
private |
Definition at line 198 of file work-force.hpp.
Referenced by Worker< CONF >::idleWait(), and Worker< CONF >::pullWork().
|
private |
Definition at line 223 of file work-force.hpp.
Referenced by Worker< CONF >::contentionWait(), and Worker< CONF >::pullWork().
|
private |
Definition at line 224 of file work-force.hpp.
Referenced by Worker< CONF >::contentionWait().
Inheritance diagram for Worker< CONF >:
Collaboration diagram for Worker< CONF >: