GitOrigin-RevId: a9ce5d406f6d3f6d1ecb99678cb69a4e9a1a9009
This commit is contained in:
Daniil Ovchinnikov
2023-04-28 10:51:48 +00:00
committed by intellij-monorepo-bot
parent 65f918a29f
commit 83c898e759
@@ -243,11 +243,13 @@ public final class ProgressRunner<R> {
resultFuture.completeExceptionally(t);
}
}
else if (ApplicationManager.getApplication().isDispatchThread()) {
resultFuture = execFromEDT(progressFuture, modalityEntered, onThreadCallable);
}
else {
resultFuture = normalExec(progressFuture, modalityEntered, onThreadCallable);
if (ApplicationManager.getApplication().isDispatchThread()) {
resultFuture = execFromEDT(progressFuture, modalityEntered, onThreadCallable);
}
else {
resultFuture = normalExec(progressFuture, modalityEntered, onThreadCallable);
}
}
return resultFuture.handle((result, e) -> {