The interface class for creating an executor observer.
More...
#include <observer.hpp>
|
virtual | ~ExecutorObserverInterface ()=default |
| virtual destructor
|
|
virtual void | set_up (unsigned num_workers) |
| constructor-like method to call when the executor observer is fully created More...
|
|
virtual void | on_entry (unsigned worker_id, TaskView task_view) |
| method to call before a worker thread executes a closure More...
|
|
virtual void | on_exit (unsigned worker_id, TaskView task_view) |
| method to call after a worker thread executed a closure More...
|
|
The interface class for creating an executor observer.
The tf::ExecutorObserver class let users define methods to monitor the behaviors of an executor. This is particularly useful when you want to inspect the performance of an executor.
◆ on_entry()
virtual void tf::ExecutorObserverInterface::on_entry |
( |
unsigned |
worker_id, |
|
|
TaskView |
task_view |
|
) |
| |
|
inlinevirtual |
method to call before a worker thread executes a closure
- Parameters
-
worker_id | the id of this worker thread |
task_view | a constant wrapper object to the task |
◆ on_exit()
virtual void tf::ExecutorObserverInterface::on_exit |
( |
unsigned |
worker_id, |
|
|
TaskView |
task_view |
|
) |
| |
|
inlinevirtual |
method to call after a worker thread executed a closure
- Parameters
-
worker_id | the id of this worker thread |
task_view | a constant wrapper object to the task |
◆ set_up()
virtual void tf::ExecutorObserverInterface::set_up |
( |
unsigned |
num_workers | ) |
|
|
inlinevirtual |
constructor-like method to call when the executor observer is fully created
- Parameters
-
num_workers | the number of the worker threads in the executor |
The documentation for this class was generated from the following file: