public static void scheduleIndexWriting(int executorIndex, @NotNull Runnable runnable) {
    INDEX_WRITES_QUEUED.incrementAndGet();
    INDEX_WRITING_POOL.get(executorIndex).execute(() -> {
      try {
        ProgressManager.getInstance().executeNonCancelableSection(runnable);
      }
      finally {
        INDEX_WRITES_QUEUED.decrementAndGet();
      }
    });
  }
public static void scheduleIndexWriting(int executorIndex, @NotNull Runnable runnable)