private void taskCompleted(GScheduledTask task, Exception e) {
		lock.lock();
		try {
			GTaskResult result = new GTaskResult(runningGroup, task, e, currentGroupTransactionID);
			task.getGroup().taskCompleted();
			notifyTaskCompleted(task, result);
			results.add(result);
			if (results.size() > MAX_RESULTS) {
				results.remove();
			}
			runningTask = null;
			if (delayedTaskStack.isEmpty()) {
				runNextTaskIfNotBusyOrSuspended();
			}
		}
		finally {
			lock.unlock();
		}
	}
Cancels all scheduled groups and tasks. The TaskMonitor for
the currently running task will be cancelled, but the task will continue to run until it
checks the monitor.
Ghidra/Framework/Project/src/main/java/ghidra/framework/task/GTaskManager.java