void (@NotNull Project project, @NotNull AsyncPromise<Object> completion) { DumbService.getInstance(project).runWhenSmart(() -> myAlarm.addRequest(() -> { if (DumbService.isDumb(project)) { completeWhenSmartModeIsLongEnough(project, completion); } else { completion.setResult(null); } }, SMART_MODE_MINIMUM_DELAY)); }