@Override
		public void run() {
			try {
				scheduledTask.setThread(Thread.currentThread());
				notifyTaskStarted(scheduledTask);

				DomainObject d = domainObject;
				if (d == null || scheduledTask.getGroup().wasCancelled()) {
					taskCompleted(scheduledTask, new CancelledException());
					return;
				}

				scheduledTask.getTask().run(d, scheduledTask.getTaskMonitor());
				taskCompleted(scheduledTask, null);
			}
			catch (Exception e) {
				taskCompleted(scheduledTask, e);
			}
		}
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