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 ()=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 | ( |  | ) |

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:

- /build/actor-framework-Z9pIPl/actor-framework-0.17.6/libcaf_core/caf/thread_hook.hpp