28 std::string
Description()
const {
return "TaskTrigger::WorkerTask"; }
35 : func_(func), task_id_(task_id), task_instance_(task_instance) {
46 bool current =
trigger_.fetch_and_store(
true);
int task_id_
The code path executed by the task.
The TaskScheduler keeps track of what tasks are currently schedulable. When a task is enqueued it is ...
bool Run()
Code to execute. Returns true if task is completed. Return false to reschedule the task...
static TaskScheduler * GetInstance()
void Enqueue(Task *task)
Enqueues a task for running. Starts task if all policy rules are met else puts task in waitq...
std::string Description() const
tbb::atomic< bool > deferred_
tbb::atomic< bool > trigger_
boost::function< bool()> FunctionPtr
int task_instance_
The dataset id within a code path.
WorkerTask(TaskTrigger *parent)
tbb::atomic< bool > disabled_
Task is a wrapper over tbb::task to support policies.
TaskTrigger(const FunctionPtr &func, int task_id, int task_instance)