synchronized boolean schedule(BackgroundCommand<Program> cmd, int priority) {

		if (cmd == null) {
			throw new IllegalArgumentException("Can't schedule a null command");
		}
		queue.add(cmd, priority);

		return startBackgroundAnalysis();
	}
Tell all the tasks that they are canceled.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AutoAnalysisManager.java