protected static void yieldToSwing() {

		if (SwingUtilities.isEventDispatchThread()) {
			Msg.error(AbstractGenericTest.class,
				"Incorrectly called yieldToSwing() from the Swing thread");
			return; // shouldn't happen
		}

		Runnable empty = () -> {
			// do nothing...this is just a placeholder runnable that gets put onto the stack
		};

		//
		// Note: the calls below are designed to ignore being interrupted.  Further, if one of
		// the calls is interrupted, the others will still work as expected.
		//
		for (int i = 0; i < 3; i++) {
			try {
				SwingUtilities.invokeAndWait(empty);
			}
			catch (Exception e) {
				// Assumption: since our runnable is empty, this can only an interrupted
				//             exception, which can happen if our test framework decides to
				//             shut the operation down.
				return;
			}
		}
	}
This is only for internal use. If you need to wait for the Swing thread
from your test, then use {@link #waitForSwing()}.

@deprecated This is not a test writer's method, but instead an
            infrastructure method.
Ghidra/Framework/Gui/src/main/java/generic/test/AbstractGuiTest.java