public void waitForCurrentTask() {
		Thread t = getCurrentThread();
		if (t != null) {
			try {
				t.join();
			}
			catch (InterruptedException e) {
				// guess we don't care
			}
		}
	}
Blocks until the current task completes.
Ghidra/Framework/Docking/src/main/java/docking/TaskScheduler.java