From 3a5df2bf07bcd76d6e7fe36aa7e9e9f42365fb3e Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Fri, 10 Jan 2020 18:27:58 +0300 Subject: [PATCH] fix race when the exception was thrown from inside FJP computation but the future wasn't canceled yet to fix JobUtilTest sporadic failures GitOrigin-RevId: cda7a3de89a5fa695b7b1978c8b16d0e98692287 --- .../src/com/intellij/concurrency/JobLauncherImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/platform/platform-impl/src/com/intellij/concurrency/JobLauncherImpl.java b/platform/platform-impl/src/com/intellij/concurrency/JobLauncherImpl.java index 9ee1923aa010..4881b87bb498 100644 --- a/platform/platform-impl/src/com/intellij/concurrency/JobLauncherImpl.java +++ b/platform/platform-impl/src/com/intellij/concurrency/JobLauncherImpl.java @@ -172,6 +172,7 @@ public class JobLauncherImpl extends JobLauncher { complete(null); // complete manually before calling callback } catch (Throwable throwable) { + myStatus = Status.EXECUTED; completeExceptionally(throwable); } finally {