thread_supervisor
Public Member Functions | Public Attributes | Protected Attributes | List of all members
anonymous_namespace{supervisor.cpp}::TestThreadSupervisor Class Reference

Detailed Description

Definition at line 40 of file supervisor.cpp.

Inheritance diagram for anonymous_namespace{supervisor.cpp}::TestThreadSupervisor:
tut::thread::InheritableSupervisor< t_Logger >

Public Member Functions

void stopSupervisedThreads () override
 
void threadFunction ()
 
void threadCounter ()
 
 TestThreadSupervisor ()
 
virtual ~TestThreadSupervisor ()
 
const Supervisor< t_Logger > & getThreadSupervisor () const
 
Supervisor< t_Logger > & getThreadSupervisor ()
 
template<class... t_Args>
void addSupervisedThread (t_Args &&...args)
 Add a thread: (<thread parameters>, <function pointer>, <this>, <function parameters>) More...
 
bool isThreadSupervisorInterrupted () const
 Should be checked by threaded class methods. More...
 

Public Attributes

std::atomic< std::size_t > counter_
 

Protected Attributes

Supervisor< t_Logger > thread_supervisor_
 

Constructor & Destructor Documentation

◆ TestThreadSupervisor()

anonymous_namespace{supervisor.cpp}::TestThreadSupervisor::TestThreadSupervisor ( )
inline

Definition at line 70 of file supervisor.cpp.

◆ ~TestThreadSupervisor()

virtual anonymous_namespace{supervisor.cpp}::TestThreadSupervisor::~TestThreadSupervisor ( )
inlinevirtual

Definition at line 75 of file supervisor.cpp.

Member Function Documentation

◆ addSupervisedThread()

template<class t_Logger = log::StdErr>
template<class... t_Args>
void tut::thread::InheritableSupervisor< t_Logger >::addSupervisedThread ( t_Args &&...  args)
inlineinherited

Add a thread: (<thread parameters>, <function pointer>, <this>, <function parameters>)

Definition at line 522 of file supervisor.h.

◆ getThreadSupervisor() [1/2]

template<class t_Logger = log::StdErr>
Supervisor<t_Logger>& tut::thread::InheritableSupervisor< t_Logger >::getThreadSupervisor ( )
inlineinherited

Definition at line 504 of file supervisor.h.

◆ getThreadSupervisor() [2/2]

template<class t_Logger = log::StdErr>
const Supervisor<t_Logger>& tut::thread::InheritableSupervisor< t_Logger >::getThreadSupervisor ( ) const
inlineinherited

Definition at line 499 of file supervisor.h.

◆ isThreadSupervisorInterrupted()

template<class t_Logger = log::StdErr>
bool tut::thread::InheritableSupervisor< t_Logger >::isThreadSupervisorInterrupted ( ) const
inlineinherited

Should be checked by threaded class methods.

Definition at line 529 of file supervisor.h.

◆ stopSupervisedThreads()

void anonymous_namespace{supervisor.cpp}::TestThreadSupervisor::stopSupervisedThreads ( )
inlineoverridevirtual

should call stop(), pure virtual to remind that threads must be destructed properly at the right time, e.g., from a destructor

Implements tut::thread::InheritableSupervisor< t_Logger >.

Definition at line 47 of file supervisor.cpp.

◆ threadCounter()

void anonymous_namespace{supervisor.cpp}::TestThreadSupervisor::threadCounter ( )
inline

Definition at line 65 of file supervisor.cpp.

◆ threadFunction()

void anonymous_namespace{supervisor.cpp}::TestThreadSupervisor::threadFunction ( )
inline

Definition at line 52 of file supervisor.cpp.

Member Data Documentation

◆ counter_

std::atomic<std::size_t> anonymous_namespace{supervisor.cpp}::TestThreadSupervisor::counter_

Definition at line 43 of file supervisor.cpp.

◆ thread_supervisor_

template<class t_Logger = log::StdErr>
Supervisor<t_Logger> tut::thread::InheritableSupervisor< t_Logger >::thread_supervisor_
protectedinherited

Definition at line 493 of file supervisor.h.


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