void () { if (getEventMerger().getApproximateChangesCount() >= 20 && myScheduledVfsEventsWorkers.compareAndSet(0, 1)) { if (DumbServiceImpl.isSynchronousTaskExecution()) { ensureUpToDate(); return; } myVfsEventsExecutor.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(); } }); } }