void (@NotNull ProgressIndicator indicator1) { try { //noinspection InfiniteLoopStatement while (true) { LockSupport.parkNanos(100_000); ProgressManager.checkCanceled(); } } finally { latch.countDown(); } }