Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
CallQueue_test::Worker Struct Reference

Description

Definition at line 173 of file call-queue-test.cpp.

Public Attributes

uint64_t producerSum = 0
 
uint64_t consumerSum = 0
 
SyncBarriertrigger_
 
Random rand_
 

Public Member Functions

void countConsumerCall (uint increment)
 
 Worker (CallQueue &queue, SyncBarrier &commonTrigger)
 
- Public Member Functions inherited from ThreadJoinable< RES >
lib::Result< RES > join ()
 put the caller into a blocking wait until this thread has terminated
 
- Public Member Functions inherited from ThreadLifecycle< POL, RES >
 ThreadLifecycle (Launch launcher)
 Primary constructor: Launch the new thread with flexible configuration.
 
template<class FUN , typename... ARGS>
 ThreadLifecycle (string const &threadID, FUN &&threadFunction, ARGS &&...args)
 Create a new thread to execute the given operation.
 
template<class SUB , typename... ARGS>
 ThreadLifecycle (RES(SUB::*memFun)(ARGS...), ARGS ...args)
 Special variant to bind a subclass member function as thread operation.
 
 operator bool () const
 Is this thread »active« and thus tied to OS resources?
 

Additional Inherited Members

- Static Public Member Functions inherited from ThreadLifecycle< POL, RES >
template<class W , class... INVO>
static auto buildInvocation (W &wrapper, tuple< INVO... > &&invocation)
 Build the invocation tuple, using invokeThreadFunction to delegate to the user-provided functor and arguments.
 
template<class... INVO>
static auto buildLauncher (INVO &&...args)
 Build a λ actually to launch the given thread operation later, after the thread-wrapper-object is fully initialised.
 
- Static Public Member Functions inherited from Sync< CONF >
static MonitorgetMonitor (Sync const *forThis)
 
- Protected Member Functions inherited from ThreadLifecycle< POL, RES >
 ~ThreadLifecycle ()
 
 ThreadLifecycle ()
 derived classes may create a disabled thread
 

Constructor & Destructor Documentation

◆ Worker()

Worker ( CallQueue queue,
SyncBarrier commonTrigger 
)
inline

Definition at line 190 of file call-queue-test.cpp.

References CallQueue_test::Worker::countConsumerCall(), delay, CallQueue::feed(), RandomSequencer< GEN >::i(), CallQueue::invoke(), CallQueue_test::Worker::producerSum, CallQueue_test::Worker::rand_, SyncBarrier::sync(), and CallQueue_test::Worker::trigger_.

+ Here is the call graph for this function:

Member Function Documentation

◆ countConsumerCall()

void countConsumerCall ( uint  increment)
inline

Definition at line 184 of file call-queue-test.cpp.

References CallQueue_test::Worker::consumerSum.

Referenced by CallQueue_test::Worker::Worker().

+ Here is the caller graph for this function:

Member Data Documentation

◆ producerSum

uint64_t producerSum = 0

Definition at line 177 of file call-queue-test.cpp.

Referenced by CallQueue_test::Worker::Worker().

◆ consumerSum

uint64_t consumerSum = 0

Definition at line 178 of file call-queue-test.cpp.

Referenced by CallQueue_test::Worker::countConsumerCall().

◆ trigger_

SyncBarrier& trigger_

Definition at line 180 of file call-queue-test.cpp.

Referenced by CallQueue_test::Worker::Worker().

◆ rand_

Random rand_

Definition at line 181 of file call-queue-test.cpp.

Referenced by CallQueue_test::Worker::Worker().

+ Inheritance diagram for CallQueue_test::Worker:
+ Collaboration diagram for CallQueue_test::Worker:

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