Class that represents thread's interest in task scheduling services.
class task_scheduler_observer;
#include "tbb/task_scheduler_observer.h"
A task_scheduler_observer permits clients to observe when a thread starts or stops participating in task scheduling (globally). You typically derive your own observer class from task_scheduler_observer, and override virtual methods on_scheduler_entry or on_scheduler_exit. An instance has a state observing or not observing. Remember to call observe() to enable observation.
namespace tbb {
class task_scheduler_observer {
public:
task_scheduler_observer();
virtual ~task_scheduler_observer();
void observe( bool state=true );
bool is_observing() const;
virtual void on_scheduler_entry( bool is_worker ) {}
virtual void on_scheduler_exit( bool is_worker } {}
};
}