Example #1
0
/* Remove this task from the run queue. */
bool task::remove_from_runqueue() {
  if (!this->running) {
    return false;
  }
  running_tasks.erase(this->runit);
  this->running = false;
  return true;
}
Example #2
0
task::~task() {
  if (running) {
    remove_from_runqueue();
  } else {
    paused_tasks.remove_paused_task(this);
  }
  all_tasks.erase(taskit);
}