public void runInBackground(@NotNull Runnable action) {
    ThreadingAssertions.assertEventDispatchThread();

    try {
      executeInModalContext(() -> {
        ensureBackgroundThreadStarted(action);

        while (isRunning()) {
          myEventStealer.dispatchEvents(10);
          updateUI(System.currentTimeMillis());
        }
      });
    }
    finally {
      progressFinished();
    }
  }
public void runInBackground(@NotNull Runnable action)