mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
honor user-defined value of "ide.prioritize.ui.thread" option
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user