Removes all completed tasks
@returns {void}
430734
function() {
			var me = this;
			Object.keys(todos).forEach(function(id) {
				if (todos[id].completed) {
					me.remove(id);
				}
			});
		}
823809
function (done) {

      // Clean up fixtures.
      _.each(fileFixtures, function (f) {
        f.unlinkSync();
      });

      // Clean up directory w/ test output.
      fsx.removeSync(outputDir.path);

      // Teardown the HTTP server.
      server.close(done);
    }
1275455
function clear() {
  timeouts.forEach((callback, timeout) => {
    clearTimeout(timeout);

    // reject Promise or execute callback which returns Error
    callback();
  });

  const length = size();
  cache.clear();
  return length;
}
1178941
function reset () {
  clear(instances);
  clear(modules);
  clear(components);
  delete renderer.Document;
  delete renderer.Element;
  delete renderer.Comment;
  delete renderer.sendTasks;
}
1357026
def cleanup(self):
		
		for task in self.__done_registry:
			task.stop()
		self.__done_registry.clear()
		self.cleanup_event().clear()
277017
function() {
            if (_.size(this.tasks) > 0) {
                this.empty = false;
                var task = this.tasks.shift();
                this.startTask(task);
                this.trigger("tasks:next");
            } else {
                this.empty = true;
                this.trigger("tasks:finish");
            }      
        }
180161
def clear(self):
        
        self.states[:] = 0
        self.actions[:] = 0
        self.rewards[:] = 0
        self.terminate_flags[:] = 0
        self.top = 0
        self.size = 0
613625
function removeAllTracks(tracks, token, count, callback) {
    var track = tracks[count];

    if (!track) {
        return callback('done');
    }

    var options = {
        id: track.id,
        oauth_token: token.oauth_token
    };

    removeTrack(options).then(function (track) {
        if (DEBUG_MODE_ON) {
            console.log('removeTrack, ', track);
        }
        count = count + 1;
        removeAllTracks(tracks, token, count, callback)
    }).catch(function (err) {
        console.log('ERROR: removeTrack, ', err);
        count = count + 1;
        removeAllTracks(tracks, token, count, callback)
    })
}
1365628
def clear(
            self  # type: ORMTask
    ):
        
        # mark this task as incomplete
        self.mark_incomplete()

        # delete objects
        for object_class in self.object_classes:
            self.session.query(object_class).delete()

        self.close_session()
1257929
private CocoQuery CleanAllTask() {
        for (final CocoTask<?> reference : taskpool.values()) {
            if (reference != null) {
                reference.cancel();
            }
        }
        return this;
    }
1231136
function completeTask() {
			if (o && _.isFunction(o.callback)) {
				o.callback(o.fontName, o.types, o.glyphs, o.hash);
			}
			allDone();
		}
63294
function deleteTasks(_ref12, tasks) {
    var state = _ref12.state,
        commit = _ref12.commit,
        dispatch = _ref12.dispatch,
        rootState = _ref12.rootState;
    dispatch('SET_TASKS', null);
    return makeRequest(commit, rootState.c3s.client.apis.Tasks.delete_tasks, {
      tasks: tasks
    }, 'c3s/task/SET_TASKS');
  }
137883
public synchronized void cleanWaitTaskQueue() {

        for (ParallelTask task : waitQ) {
            task.setState(ParallelTaskState.COMPLETED_WITH_ERROR);
            task.getTaskErrorMetas().add(
                    new TaskErrorMeta(TaskErrorType.USER_CANCELED, "NA"));
            logger.info(
                    "task {} removed from wait q. This task has been marked as USER CANCELED.",
                    task.getTaskId());

        }

        waitQ.clear();
    }
58503
function clean(): Result {
    return $this->collectionBuilder()
      ->addTask($this->taskCleanDir('var'))
      ->addTask($this->taskDeleteDir(['build', 'doc/api', 'web']))
      ->run();
  }
1010979
def cleanup(self):
        
        if self.transport:
            self.transport.close()
            self.transport = None
        if self.task:
            self.task.cancel()
            self.task = None
        for light in self.lights.values():
            light.cleanup()
        self.lights = {}
871255
public function cleanUp()
    {
        // create a separate queue for each priority
        foreach (PriorityKeys::getAll() as $priorityKey) {
            $this->workers[$this->uniqueWorkerName($priorityKey)]->stop();
        }
    }
1003476
function remove() {
    primus.removeListener('error', remove)
          .removeListener('open', remove)
          .removeListener('end', remove)
          .timers.clear('connect');
  }