public void ensureUpToDateAsync() {
    if (getEventMerger().getApproximateChangesCount() < 20 || !myScheduledVfsEventsWorkers.compareAndSet(0, 1)) {
      return;
    }

    if (DumbServiceImpl.isSynchronousTaskExecution()) {
      ensureUpToDate();
      return;
    }

    vfsEventsExecutor.execute(() -> {
      try {
        processFilesInReadActionWithYieldingToWriteAction();

        if (Registry.is("try.starting.dumb.mode.where.many.files.changed")) {
          for (Project project : ProjectManager.getInstance().getOpenProjects()) {
            try {
              FileBasedIndexProjectHandler.scheduleReindexingInDumbMode(project);
            }
            catch (AlreadyDisposedException | ProcessCanceledException ignored) {
            }
            catch (Exception e) {
              LOG.error(e);
            }
          }
        }
      }
      finally {
        myScheduledVfsEventsWorkers.decrementAndGet();
      }
    });
  }
public void ensureUpToDateAsync()