MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ cancel_task() [1/2]

bool MayaFlux::Vruta::TaskScheduler::cancel_task ( const std::string &  name)

Cancel a task by name.

Parameters
nameTask name to cancel
Returns
True if found and cancelled

Definition at line 47 of file Scheduler.cpp.

48{
49 auto it = find_task_by_name(name);
50 if (it != m_tasks.end()) {
51 if (it->routine && it->routine->is_active()) {
52 it->routine->set_should_terminate(true);
53 }
54 m_tasks.erase(it);
55 return true;
56 }
57 return false;
58}
std::vector< TaskEntry > m_tasks
std::vector< TaskEntry >::iterator find_task_by_name(const std::string &name)
Find task entry by name.

References find_task_by_name(), and m_tasks.

+ Here is the call graph for this function: