public void invokeAfterUpdate(@NotNull Runnable afterUpdate,
                                @NotNull InvokeAfterUpdateMode mode,
                                @Nullable @Nls String title) {
    debug("invokeAfterUpdate called");
    InvokeAfterUpdateCallback.Callback callback = InvokeAfterUpdateCallback.create(myProject, mode, afterUpdate, title);

    boolean stopped;
    synchronized (myLock) {
      stopped = myStopped;
      if (!stopped) {
        myWaitingUpdateCompletionQueue.add(callback::endProgress);
        schedule(true);
      }
    }
    if (stopped) {
      debug("invokeAfterUpdate: stopped, invoke right now");
      callback.handleStoppedQueue();
    }
    else {
      callback.startProgress();
      debug("invokeAfterUpdate: start progress");
    }
  }
public void invokeAfterUpdate(@NotNull Runnable afterUpdate,
                                @NotNull InvokeAfterUpdateMode mode,
                                @Nullable @Nls String title)