Taskflow
2.4-master-branch
|
The interface class for creating an executor observer. More...
#include <observer.hpp>
Public Member Functions | |
virtual | ~ObserverInterface ()=default |
virtual destructor | |
virtual void | set_up (size_t num_workers)=0 |
constructor-like method to call when the executor observer is fully created More... | |
virtual void | on_entry (size_t worker_id, TaskView task_view)=0 |
method to call before a worker thread executes a closure More... | |
virtual void | on_exit (size_t worker_id, TaskView task_view)=0 |
method to call after a worker thread executed a closure More... | |
Friends | |
class | Executor |
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.
|
pure virtual |
method to call before a worker thread executes a closure
worker_id | the id of this worker thread |
task_view | a constant wrapper object to the task |
|
pure virtual |
method to call after a worker thread executed a closure
worker_id | the id of this worker thread |
task_view | a constant wrapper object to the task |
|
pure virtual |
constructor-like method to call when the executor observer is fully created
num_workers | the number of the worker threads in the executor |