From 91d5d75923925eb230bf43ecfae15d735277e23d Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Wed, 28 Oct 2015 13:50:09 +0300 Subject: [PATCH] do not startup commonPool accidentally --- .../src/com/intellij/concurrency/JobLauncherImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/concurrency/JobLauncherImpl.java b/platform/platform-impl/src/com/intellij/concurrency/JobLauncherImpl.java index 79396f8a7be5..8821125f7900 100644 --- a/platform/platform-impl/src/com/intellij/concurrency/JobLauncherImpl.java +++ b/platform/platform-impl/src/com/intellij/concurrency/JobLauncherImpl.java @@ -288,7 +288,9 @@ public class JobLauncherImpl extends JobLauncher { catch (CancellationException e) { // was canceled in the middle of execution // can't do anything but wait. help other tasks in the meantime - pool.awaitQuiescence(millis, TimeUnit.MILLISECONDS); + if (Thread.currentThread() instanceof ForkJoinWorkerThread) { // if called outside FJP the FJTask.fork() starts up commonPool which is undesirable + pool.awaitQuiescence(millis, TimeUnit.MILLISECONDS); + } } } }