private <V, E extends Throwable> V computeUnderProgress(@NotNull ThrowableComputable<V, E> process, ProgressIndicator progress) throws E {
    if (progress == null) {
      myUnsafeProgressCount.incrementAndGet();
      try {
        return process.compute();
      }
      finally {
        myUnsafeProgressCount.decrementAndGet();
      }
    }

    ProgressIndicator oldIndicator = getProgressIndicator();
    if (progress == oldIndicator) {
      return process.compute();
    }

    Thread currentThread = Thread.currentThread();
    long threadId = currentThread.getId();
    setCurrentIndicator(threadId, progress);
    try {
      return registerIndicatorAndRun(progress, currentThread, oldIndicator, process);
    }
    finally {
      setCurrentIndicator(threadId, oldIndicator);
    }
  }
private <V, E extends Throwable> V computeUnderProgress(@NotNull ThrowableComputable<V, E> process, ProgressIndicator progress)