C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::thread_hook Class Referenceabstract

Interface to define thread hooks. More...

#include <thread_hook.hpp>

Public Member Functions

virtual void init (actor_system &)=0
 Called by the actor system once before starting any threads.
 
virtual void thread_started (thread_owner owner)=0
 Called whenever the actor system has started a new thread.
 
virtual void thread_terminates ()=0
 Called whenever a thread is about to quit.
 

Detailed Description

Interface to define thread hooks.

Member Function Documentation

◆ thread_started()

virtual void caf::thread_hook::thread_started ( thread_owner owner)
pure virtual

Called whenever the actor system has started a new thread.

To access a reference to the started thread use std::this_thread.

Parameters
ownerIdentifies the CAF component that created this thread.
Warning
must the thread-safe

◆ thread_terminates()

virtual void caf::thread_hook::thread_terminates ( )
pure virtual

Called whenever a thread is about to quit.

To access a reference to the terminating thread use std::this_thread.

Warning
must the thread-safe

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