void (@NotNull ProgressIndicator indicator, @NotNull Ref<? super ContextConstraint> outUnsatisfiedConstraint) { try { if (checkObsolete()) { cancelJob(null); return; } ContextConstraint constraint = builder.findUnsatisfiedConstraint(); if (constraint != null) { outUnsatisfiedConstraint.set(constraint); return; } T result = builder.myActualComputation.call(); if (shouldFinishOnEdt()) { safeTransferToEdt(result); } else { try { setResult(result); } finally { completeJob(); } } } catch (ServiceNotReadyException e) { failJob(e); throw e; } catch (ProcessCanceledException e) { if (!indicator.isCanceled()) { failJob(e); setError(e); // don't restart after a manually thrown PCE } throw e; } catch (Throwable e) { failJob(e); setError(e); } }