void (@NotNull ProgressIndicator indicator) { try { indicator.checkCanceled(); myProcessor.processAfterEvents(events); myProcessor.executePendingTasks(); } catch (ProcessCanceledException e) { myProcessor.clearAllPendingTasks(); } }