Lumiera  0.pre.03
»edit your freedom«
CallQueue_test Class Reference

Description

Test:
verify a helper component for dispatching functors through a threadsafe queue.

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

Classes

struct  Worker
 

Private Types

using Workers = lib::ScopedCollection< Worker >
 

Private Member Functions

virtual void run (Arg)
 
void verify_Consistency ()
 
void verify_SimpleUse ()
 
void verify_ThreadSafety ()
 

Member Function Documentation

◆ verify_Consistency()

void verify_Consistency ( )
inlineprivate
Test:
consistency of queue data handling
  • functors of various types can be mixed
  • entries are moved in and out of the queue
  • no copying whatsoever happens
  • each entry gets invoked
  • all entries are invoked in order
  • enqueuing and dequeuing can be interspersed
  • no memory leaks in bound argument data

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

◆ verify_ThreadSafety()

void verify_ThreadSafety ( )
inlineprivate
Test:
torture the CallQueue by massively multithreaded dispatch
  • start #NUM_OF_THREADS (e.g.

50) threads in parallel

  • each of those has a randomised execution pattern to add new functors and dispatch other thread's functors

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

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

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