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

Description

Test:
verify lifecycle behaviour of threads managed by thread-wrapper.
See also
thread.hpp
ThreadWrapperBackground_test
ThreadWrapperJoin_test

Definition at line 61 of file thread-wrapper-lifecycle-test.cpp.

Private Member Functions

void defaultWrapperLifecycle ()
 
void demonstrateExplicitThreadLifecycle ()
 
virtual void run (Arg)
 
void verifyThreadLifecycleHooks ()
 

Additional Inherited Members

- Public Member Functions inherited from Test
virtual void run (Arg arg)=0
 

Member Function Documentation

◆ defaultWrapperLifecycle()

void defaultWrapperLifecycle ( )
inlineprivate
Test:
demonstrate terms of lifecycle for the default case

Definition at line 75 of file thread-wrapper-lifecycle-test.cpp.

◆ verifyThreadLifecycleHooks()

void verifyThreadLifecycleHooks ( )
inlineprivate
Test:
attach user provided callback hooks to the thread lifecycle.

Definition at line 102 of file thread-wrapper-lifecycle-test.cpp.

◆ demonstrateExplicitThreadLifecycle()

void demonstrateExplicitThreadLifecycle ( )
inlineprivate
Test:
verify a special setup to start a thread explicitly and to track the thread's lifecycle state.
  • use a component to encapsulate the thread
  • this TestThread component is managed in a unique_ptr
  • thus it is explicitly possible to be not in running state
  • when starting the TestThread, a lifecycle callback is bound
  • at termination this callback will clear the unique_ptr
  • thus allocation and running state is tied to the lifecycle

Definition at line 133 of file thread-wrapper-lifecycle-test.cpp.

+ Inheritance diagram for ThreadWrapperLifecycle_test:
+ Collaboration diagram for ThreadWrapperLifecycle_test:

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