public void waitForHigherPriorityTasks() {
		lock.lock();
		try {
			if (runningTask == null) {
				return;
			}
			if (!runningTask.isRunningInCurrentThread()) {
				throw new IllegalStateException(
					"Can only call this method from a currently running task");
			}
			int currentPriority = runningTask.getPriority();

			while (!priorityQ.isEmpty()) {
				GScheduledTask nextTask = priorityQ.first();
				if (nextTask.getPriority() >= currentPriority) {
					break;
				}
				delayedTaskStack.push(runningTask);
				runningTask.getTaskMonitor().setMessage("WAITING FOR HIGHER PRIORITY TASKS!");
				if (suspended) {
					doWait();
				}
				runningTask = nextTask;
				priorityQ.remove(nextTask);
				lock.unlock();
				GTaskRunnable runnable = new GTaskRunnable(nextTask);
				runnable.run();
				lock.lock();
				runningTask = delayedTaskStack.pop();
			}
		}
		finally {
			lock.unlock();
		}

	}
This methods is for currently running tasks to suspend and allow higher priority tasks 
(within the same task group) to complete before continuing.  If called by any thread other
than the thread that is currently executing a task for this queue, an exception will be 
thrown.
@throws IllegalStateException if this method is called from any thread not currently 
executing the current task for this queue.
Ghidra/Framework/Project/src/main/java/ghidra/framework/task/GTaskManager.java