private T waitForValue(SwingWorker<T, Object> swingWorker) {
		T newValue = null;
		while (true) {
			try {
				// java swing worker blocks on get() until worker completes.
				newValue = swingWorker.get();
				break;
			}
			catch (ExecutionException e) {
				if (!taskMonitor.isCancelled()) {
					Msg.error(this, "Error running " + name, e);
				}
				break;
			}
			catch (InterruptedException e) {
				// try again
			}
		}

		taskMonitor.clear();
		worker = null;
		return newValue;
	}
A method for clients to use as a callback for completion.  This method will be called in
the Swing thread, after the value has been set.
Ghidra/Framework/Docking/src/main/java/ghidra/util/task/CachingSwingWorker.java