From 0c2233b8fc41d92c23a7304cace0630234c3e12d Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 6 Oct 2014 18:39:01 +0400 Subject: [PATCH] comment --- .../src/com/intellij/openapi/project/CacheUpdateRunner.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/project/CacheUpdateRunner.java b/platform/platform-impl/src/com/intellij/openapi/project/CacheUpdateRunner.java index bb65c53285b6..968ac8720d1b 100644 --- a/platform/platform-impl/src/com/intellij/openapi/project/CacheUpdateRunner.java +++ b/platform/platform-impl/src/com/intellij/openapi/project/CacheUpdateRunner.java @@ -263,7 +263,7 @@ public class CacheUpdateRunner extends DumbModeTask { try { final FileContent fileContent = myQueue.take(myInnerIndicator); if (fileContent == null) { - myFinished.set(Boolean.TRUE); + myFinished.set(true); return; } @@ -295,6 +295,7 @@ public class CacheUpdateRunner extends DumbModeTask { @Override public void run() { if (myProcessInReadAction) { + // in wait methods we don't want to deadlock by grabbing write lock (or having it in queue) and trying to run read action in separate thread if (!ApplicationManagerEx.getApplicationEx().tryRunReadAction(action)) { throw new ProcessCanceledException(); }