libcaf  0.16.0
Public Member Functions | List of all members
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 ()=0
 Called whenever the actor system has started a new thread. More...
 
virtual void thread_terminates ()=0
 Called whenever a thread is about to quit. More...
 

Detailed Description

Interface to define thread hooks.

Member Function Documentation

◆ thread_started()

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

Called whenever the actor system has started a new thread.

To access a reference to the started thread use std::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 file: