private void programClosed(Program closedProgram) {
		Iterator<DecompilerProvider> iterator = disconnectedProviders.iterator();
		while (iterator.hasNext()) {
			DecompilerProvider provider = iterator.next();
			if (provider.getProgram() == closedProgram) {
				iterator.remove();
				removeProvider(provider);
			}
		}
		if (connectedProvider != null) {
			connectedProvider.programClosed(closedProgram);
		}
	}
Delay location changes to allow location events to settle down. This happens when a
readDataState occurs when a tool is restored or when switching program tabs.
Ghidra/Features/Decompiler/src/main/java/ghidra/app/plugin/core/decompile/DecompilePlugin.java