void (@Nullable Throwable cause, @NotNull String reason) { if (tryCancel()) { myCancellationCause = cause; if (cause != null) { myTraceableDisposable.killExceptionally(cause); } ProgressManager.getInstance().executeNonCancelableSection(() -> onCancelled(reason)); } }