honor user-defined value of "ide.prioritize.ui.thread" option

This commit is contained in:
peter
2016-02-27 12:42:55 +01:00
parent d94e5e9d61
commit 2b7ea6176c
2 changed files with 3 additions and 2 deletions
@@ -54,7 +54,7 @@ public class CoreProgressManager extends ProgressManager implements Disposable {
private final AtomicInteger myCurrentModalProgressCount = new AtomicInteger(0);
private static final boolean ENABLED = !"disabled".equals(System.getProperty("idea.ProcessCanceledException"));
private static final boolean ourMaySleepInCheckCanceled = Registry.is("ide.prioritize.ui.thread", false);
private static boolean ourMaySleepInCheckCanceled;
private ScheduledFuture<?> myCheckCancelledFuture; // guarded by threadsUnderIndicator
// indicator -> threads which are running under this indicator. guarded by threadsUnderIndicator.
@@ -504,6 +504,7 @@ public class CoreProgressManager extends ProgressManager implements Disposable {
}
private static void updateShouldCheckCanceled() {
ourMaySleepInCheckCanceled = Registry.is("ide.prioritize.ui.thread", false);
if (ourMaySleepInCheckCanceled && HeavyProcessLatch.INSTANCE.hasPrioritizedThread()) {
shouldCheckCanceled = true;
return;
@@ -716,7 +716,7 @@ idea.io.safe.sync=true
idea.io.safe.sync.description=When "Safe Write" is enabled, sync() is invoked after the last write to flush data to disk
ide.prioritize.ui.thread=false
ide.prioritize.ui.thread.description=In presence of UI activity, deprioritizes all other threads for the activity to complete ASAP. Changing requires restart.
ide.prioritize.ui.thread.description=In presence of UI activity, deprioritizes all other threads for the activity to complete ASAP
ide.require.transaction.for.model.changes=false
ide.require.transaction.for.model.changes.description=Whether write action can only happen under TransactionGuard