GitOrigin-RevId: ccf49e7210f6b786763117a6f5a22a643bd38ca5
This commit is contained in:
Vladimir Krivosheev
2020-02-22 17:14:31 +00:00
committed by intellij-monorepo-bot
parent 5f7c5a8d18
commit dcab9e0d8b
15 changed files with 68 additions and 106 deletions
@@ -1,4 +1,4 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.compiler.server;
import com.intellij.ProjectTopics;
@@ -10,7 +10,6 @@ import com.intellij.compiler.impl.javaCompiler.BackendCompiler;
import com.intellij.compiler.impl.javaCompiler.eclipse.EclipseCompilerConfiguration;
import com.intellij.compiler.impl.javaCompiler.javac.JavacConfiguration;
import com.intellij.compiler.server.impl.BuildProcessClasspathManager;
import com.intellij.concurrency.JobScheduler;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.ExecutionListener;
import com.intellij.execution.ExecutionManager;
@@ -23,7 +22,10 @@ import com.intellij.ide.file.BatchFileChangeListener;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.application.*;
import com.intellij.openapi.compiler.*;
import com.intellij.openapi.compiler.CompilationStatusListener;
import com.intellij.openapi.compiler.CompileContext;
import com.intellij.openapi.compiler.CompilerPaths;
import com.intellij.openapi.compiler.CompilerTopics;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
@@ -52,6 +54,7 @@ import com.intellij.openapi.vfs.newvfs.events.VFileEvent;
import com.intellij.openapi.vfs.newvfs.impl.FileNameCache;
import com.intellij.openapi.wm.IdeFrame;
import com.intellij.util.*;
import com.intellij.util.concurrency.AppExecutorUtil;
import com.intellij.util.concurrency.SequentialTaskExecutor;
import com.intellij.util.containers.IntArrayList;
import com.intellij.util.io.BaseOutputReader;
@@ -315,7 +318,7 @@ public final class BuildManager implements Disposable {
ShutDownTracker.getInstance().registerShutdownTask(this::stopListening);
if (!IS_UNIT_TEST_MODE) {
ScheduledFuture<?> future = JobScheduler.getScheduler().scheduleWithFixedDelay(() -> runCommand(myGCTask), 3, 180, TimeUnit.MINUTES);
ScheduledFuture<?> future = AppExecutorUtil.getAppScheduledExecutorService().scheduleWithFixedDelay(() -> runCommand(myGCTask), 3, 180, TimeUnit.MINUTES);
Disposer.register(this, () -> future.cancel(false));
}
}
@@ -1,7 +1,6 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.execution.impl;
import com.intellij.concurrency.JobScheduler;
import com.intellij.debugger.engine.JavaDebugProcess;
import com.intellij.debugger.impl.DebuggerUtilsEx;
import com.intellij.debugger.impl.attach.JavaDebuggerAttachUtil;
@@ -38,6 +37,7 @@ import com.intellij.unscramble.ThreadDumpParser;
import com.intellij.unscramble.ThreadState;
import com.intellij.util.ArrayUtilRt;
import com.intellij.util.TimeoutUtil;
import com.intellij.util.concurrency.AppExecutorUtil;
import com.intellij.util.messages.MessageBusConnection;
import com.intellij.util.text.DateFormatUtil;
import com.intellij.xdebugger.XDebugProcess;
@@ -298,7 +298,7 @@ public class DefaultJavaProgramRunner implements JvmPatchableProgramRunner<Runne
public void startNotified(@NotNull ProcessEvent event) {
if (!ApplicationManager.getApplication().isUnitTestMode()) {
// 1 second delay to allow jvm to start correctly
JobScheduler.getScheduler()
AppExecutorUtil.getAppScheduledExecutorService()
.schedule(() -> myEnabled.set(!myProcessHandler.isProcessTerminating() && !myProcessHandler.isProcessTerminated() &&
JavaDebuggerAttachUtil.canAttach(myProcessHandler)),
1, TimeUnit.SECONDS);
@@ -1,7 +1,6 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.configurationStore.statistic.eventLog
import com.intellij.concurrency.JobScheduler
import com.intellij.configurationStore.ComponentInfo
import com.intellij.configurationStore.ComponentStoreImpl
import com.intellij.internal.statistic.eventLog.fus.FeatureUsageLogger
@@ -13,6 +12,7 @@ import com.intellij.openapi.components.stateStore
import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.ex.ProjectManagerEx
import com.intellij.util.concurrency.AppExecutorUtil
import java.util.*
import java.util.concurrent.CompletableFuture
import java.util.concurrent.Executor
@@ -31,7 +31,7 @@ internal class FeatureUsageSettingsEventScheduler : FeatureUsageStateEventTracke
return
}
JobScheduler.getScheduler().scheduleWithFixedDelay({ logConfigStateEvents() }, INITIAL_DELAY.toLong(), PERIOD_DELAY.toLong(), TimeUnit.MINUTES)
AppExecutorUtil.getAppScheduledExecutorService().scheduleWithFixedDelay({ logConfigStateEvents() }, INITIAL_DELAY.toLong(), PERIOD_DELAY.toLong(), TimeUnit.MINUTES)
}
}
@@ -2,7 +2,6 @@
package com.intellij.openapi.progress.impl;
import com.google.common.collect.ConcurrentHashMultiset;
import com.intellij.concurrency.JobScheduler;
import com.intellij.diagnostic.ThreadDumper;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.application.ApplicationManager;
@@ -74,7 +73,7 @@ public class CoreProgressManager extends ProgressManager implements Disposable {
// must be under threadsUnderIndicator lock
private void startBackgroundNonStandardIndicatorsPing() {
if (myCheckCancelledFuture == null) {
myCheckCancelledFuture = JobScheduler.getScheduler().scheduleWithFixedDelay(() -> {
myCheckCancelledFuture = AppExecutorUtil.getAppScheduledExecutorService().scheduleWithFixedDelay(() -> {
for (ProgressIndicator indicator : nonStandardIndicators) {
try {
indicator.checkCanceled();
@@ -12,7 +12,6 @@ import com.intellij.codeInsight.hint.EditorHintListener;
import com.intellij.codeInsight.hint.HintManager;
import com.intellij.codeInsight.lookup.*;
import com.intellij.codeInsight.lookup.impl.LookupImpl;
import com.intellij.concurrency.JobScheduler;
import com.intellij.featureStatistics.FeatureUsageTracker;
import com.intellij.icons.AllIcons;
import com.intellij.injected.editor.DocumentWindow;
@@ -52,6 +51,7 @@ import com.intellij.ui.GuiUtils;
import com.intellij.ui.LightweightHint;
import com.intellij.util.Alarm;
import com.intellij.util.ObjectUtils;
import com.intellij.util.concurrency.AppExecutorUtil;
import com.intellij.util.concurrency.Semaphore;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.messages.MessageBusConnection;
@@ -452,7 +452,7 @@ public class CompletionProgressIndicator extends ProgressIndicatorBase implement
myCount++; // invoked from a single thread
if (myCount == 1) {
JobScheduler.getScheduler().schedule(myFreezeSemaphore::up, ourInsertSingleItemTimeSpan, TimeUnit.MILLISECONDS);
AppExecutorUtil.getAppScheduledExecutorService().schedule(myFreezeSemaphore::up, ourInsertSingleItemTimeSpan, TimeUnit.MILLISECONDS);
}
myQueue.queue(myUpdate);
}
@@ -1,30 +1,16 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.util.ui;
import com.intellij.concurrency.JobScheduler;
import com.intellij.openapi.Disposable;
import com.intellij.util.concurrency.AppExecutorUtil;
import org.jetbrains.annotations.NonNls;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
/**
* @deprecated use {@link JobScheduler#getScheduler()} instead
* @deprecated use {@link AppExecutorUtil#getAppScheduledExecutorService()} instead
*/
@Deprecated
public abstract class Timer implements Disposable, Runnable {
@@ -176,6 +162,6 @@ public abstract class Timer implements Disposable, Runnable {
future.cancel(true);
}
timer.setFuture(JobScheduler.getScheduler().schedule(timer, span, TimeUnit.MILLISECONDS));
timer.setFuture(AppExecutorUtil.getAppScheduledExecutorService().schedule(timer, span, TimeUnit.MILLISECONDS));
}
}
@@ -1,7 +1,6 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.ide;
import com.intellij.concurrency.JobScheduler;
import com.intellij.diagnostic.VMOptions;
import com.intellij.execution.process.UnixProcessManager;
import com.intellij.ide.actions.EditCustomVmOptionsAction;
@@ -20,6 +19,7 @@ import com.intellij.openapi.util.SystemInfo;
import com.intellij.util.JdkBundle;
import com.intellij.util.SystemProperties;
import com.intellij.util.TimeoutUtil;
import com.intellij.util.concurrency.AppExecutorUtil;
import com.intellij.util.lang.JavaVersion;
import com.sun.jna.*;
import org.jetbrains.annotations.NotNull;
@@ -170,7 +170,7 @@ final class SystemHealthMonitor extends PreloadingActivity {
final AtomicBoolean reported = new AtomicBoolean();
final ThreadLocal<Future<Long>> ourFreeSpaceCalculation = new ThreadLocal<>();
JobScheduler.getScheduler().schedule(new Runnable() {
AppExecutorUtil.getAppScheduledExecutorService().schedule(new Runnable() {
private static final long LOW_DISK_SPACE_THRESHOLD = 50 * 1024 * 1024;
private static final long MAX_WRITE_SPEED_IN_BPS = 500 * 1024 * 1024; // 500 MB/sec is near max SSD sequential write speed
@@ -239,7 +239,7 @@ final class SystemHealthMonitor extends PreloadingActivity {
}
private void restart(long timeout) {
JobScheduler.getScheduler().schedule(this, timeout, TimeUnit.SECONDS);
AppExecutorUtil.getAppScheduledExecutorService().schedule(this, timeout, TimeUnit.SECONDS);
}
}, 1, TimeUnit.SECONDS);
}
@@ -1,7 +1,6 @@
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.internal;
import com.intellij.concurrency.JobScheduler;
import com.intellij.ide.ApplicationInitializedListener;
import com.intellij.ide.plugins.PluginManagerCore;
import com.intellij.notification.Notification;
@@ -11,6 +10,7 @@ import com.intellij.openapi.application.Application;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.extensions.ExtensionNotApplicableException;
import com.intellij.util.concurrency.AppExecutorUtil;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -73,7 +73,7 @@ public final class DebugAttachDetector implements ApplicationInitializedListener
return;
}
myTask = JobScheduler.getScheduler().scheduleWithFixedDelay(() -> {
myTask = AppExecutorUtil.getAppScheduledExecutorService().scheduleWithFixedDelay(() -> {
boolean attached = isAttached(myAgentProperties);
if (!myReady) {
myAttached = attached;
@@ -3,7 +3,6 @@ package com.intellij.openapi.application.impl;
import com.intellij.BundleBase;
import com.intellij.CommonBundle;
import com.intellij.concurrency.JobScheduler;
import com.intellij.configurationStore.StoreUtil;
import com.intellij.diagnostic.*;
import com.intellij.execution.process.ProcessIOExecutorService;
@@ -730,11 +729,11 @@ public class ApplicationImpl extends PlatformComponentManagerImpl implements App
dialogRemover.run();
}
else {
JobScheduler.getScheduler().schedule(this, 1, TimeUnit.SECONDS);
AppExecutorUtil.getAppScheduledExecutorService().schedule(this, 1, TimeUnit.SECONDS);
}
}
};
JobScheduler.getScheduler().schedule(task, 1, TimeUnit.SECONDS);
AppExecutorUtil.getAppScheduledExecutorService().schedule(task, 1, TimeUnit.SECONDS);
}
String name = ApplicationNamesInfo.getInstance().getFullProductName();
String message = ApplicationBundle.message(hasUnsafeBgTasks ? "exit.confirm.prompt.tasks" : "exit.confirm.prompt", name);
@@ -1165,7 +1164,7 @@ public class ApplicationImpl extends PlatformComponentManagerImpl implements App
if (!myLock.isWriteLocked()) {
Future<?> reportSlowWrite = ourDumpThreadsOnLongWriteActionWaiting <= 0 ? null :
JobScheduler.getScheduler()
AppExecutorUtil.getAppScheduledExecutorService()
.scheduleWithFixedDelay(() -> PerformanceWatcher.getInstance().dumpThreads("waiting", true),
ourDumpThreadsOnLongWriteActionWaiting,
ourDumpThreadsOnLongWriteActionWaiting, TimeUnit.MILLISECONDS);
@@ -1,7 +1,6 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.vfs.impl.local;
import com.intellij.concurrency.JobScheduler;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.fileEditor.FileDocumentManager;
@@ -20,6 +19,7 @@ import com.intellij.openapi.vfs.newvfs.VfsImplUtil;
import com.intellij.openapi.vfs.newvfs.persistent.PersistentFS;
import com.intellij.util.Consumer;
import com.intellij.util.ObjectUtils;
import com.intellij.util.concurrency.AppExecutorUtil;
import com.intellij.util.containers.ContainerUtil;
import gnu.trove.THashMap;
import gnu.trove.THashSet;
@@ -75,7 +75,7 @@ public final class LocalFileSystemImpl extends LocalFileSystemBase implements Di
myManagingFS = ManagingFS.getInstance();
myWatcher = new FileWatcher(myManagingFS);
if (myWatcher.isOperational()) {
JobScheduler.getScheduler().scheduleWithFixedDelay(
AppExecutorUtil.getAppScheduledExecutorService().scheduleWithFixedDelay(
() -> { if (!ApplicationManager.getApplication().isDisposed()) storeRefreshStatusToFiles(); },
STATUS_UPDATE_PERIOD, STATUS_UPDATE_PERIOD, TimeUnit.MILLISECONDS);
}
@@ -1,39 +1,25 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
/*
* @author max
*/
package com.intellij.openapi.vfs.newvfs.persistent;
import com.intellij.concurrency.JobScheduler;
import com.intellij.util.ConcurrencyUtil;
import com.intellij.util.concurrency.AppExecutorUtil;
import org.jetbrains.annotations.NotNull;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
public class FlushingDaemon {
public final class FlushingDaemon {
public static final String NAME = "Flushing Daemon";
private FlushingDaemon() {}
@NotNull
public static ScheduledFuture<?> everyFiveSeconds(@NotNull Runnable r) {
return JobScheduler.getScheduler().scheduleWithFixedDelay(ConcurrencyUtil.underThreadNameRunnable(NAME, r), 5, 5, TimeUnit.SECONDS);
return AppExecutorUtil
.getAppScheduledExecutorService().scheduleWithFixedDelay(ConcurrencyUtil.underThreadNameRunnable(NAME, r), 5, 5, TimeUnit.SECONDS);
}
}
@@ -1,4 +1,4 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.diagnostic;
import com.intellij.util.containers.ObjectLongHashMap;
@@ -23,8 +23,6 @@ public final class StartUpMeasurer {
// It is not serves only display purposes - it is IDs. Visualizer and another tools to analyze data uses phase IDs,
// so, any changes must be discussed across all involved and reflected in changelog (see `format-changelog.md`).
public static final class Activities {
public static final String APP_STARTER = "appStarter";
// this phase name is not fully clear - it is time from `ApplicationLoader.initApplication` to `ApplicationLoader.run`
public static final String INIT_APP = "app initialization";
@@ -12,15 +12,17 @@ import com.intellij.openapi.wm.ToolWindowId
import com.intellij.openapi.wm.ToolWindowManager
import com.intellij.openapi.wm.impl.content.ToolWindowContentUi.HIDE_ID_LABEL
class ChangesViewToolWindowFactory : VcsToolWindowFactory() {
private class ChangesViewToolWindowFactory : VcsToolWindowFactory() {
override fun updateState(project: Project, toolWindow: ToolWindow) {
super.updateState(project, toolWindow)
toolWindow.stripeTitle = project.vcsManager.allActiveVcss.singleOrNull()?.displayName ?: ToolWindowId.VCS
}
}
class CommitToolWindowFactory : VcsToolWindowFactory() {
override fun shouldBeAvailable(project: Project): Boolean = super.shouldBeAvailable(project) && project.isCommitToolWindow
private class CommitToolWindowFactory : VcsToolWindowFactory() {
override fun shouldBeAvailable(project: Project): Boolean {
return super.shouldBeAvailable(project) && project.isCommitToolWindow
}
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
toolWindow.component.putClientProperty(HIDE_ID_LABEL, "true")
@@ -28,16 +30,18 @@ class CommitToolWindowFactory : VcsToolWindowFactory() {
}
}
internal class ActivateVersionControlToolWindowAction : ActivateToolWindowAction(ToolWindowId.VCS) {
private class ActivateVersionControlToolWindowAction : ActivateToolWindowAction(ToolWindowId.VCS) {
init {
templatePresentation.text = toolWindowId
}
override fun useMnemonicFromShortcuts(project: Project): Boolean =
ToolWindowManager.getInstance(project).getToolWindow(COMMIT_TOOLWINDOW_ID)?.isAvailable != true ||
isShortcutCustomized(toolWindowId) ||
isShortcutCustomized(COMMIT_TOOLWINDOW_ID)
override fun useMnemonicFromShortcuts(project: Project): Boolean {
return ToolWindowManager.getInstance(project).getToolWindow(COMMIT_TOOLWINDOW_ID)?.isAvailable != true ||
isShortcutCustomized(toolWindowId) ||
isShortcutCustomized(COMMIT_TOOLWINDOW_ID)
}
}
private fun isShortcutCustomized(toolWindowId: String): Boolean =
isShortcutCustomized(getActionIdForToolWindow(toolWindowId), KeymapManager.getInstance().activeKeymap)
private fun isShortcutCustomized(toolWindowId: String): Boolean {
return isShortcutCustomized(getActionIdForToolWindow(toolWindowId), KeymapManager.getInstance().activeKeymap)
}
@@ -30,17 +30,16 @@ abstract class VcsToolWindowFactory : ToolWindowFactory, DumbAware {
val project = (window as ToolWindowEx).project
updateState(project, window)
with(project.messageBus.connect()) {
subscribe(VCS_CONFIGURATION_CHANGED, VcsListener {
runInEdt {
if (project.isDisposed) return@runInEdt
updateState(project, window)
}
})
subscribe(ChangesViewContentManagerListener.TOPIC, object : ChangesViewContentManagerListener {
override fun toolWindowMappingChanged() = updateState(project, window)
})
}
val connection = project.messageBus.connect()
connection.subscribe(VCS_CONFIGURATION_CHANGED, VcsListener {
runInEdt {
if (project.isDisposed) return@runInEdt
updateState(project, window)
}
})
connection.subscribe(ChangesViewContentManagerListener.TOPIC, object : ChangesViewContentManagerListener {
override fun toolWindowMappingChanged() = updateState(project, window)
})
}
override fun shouldBeAvailable(project: Project): Boolean = project.vcsManager.hasAnyMappings()
@@ -67,7 +66,7 @@ abstract class VcsToolWindowFactory : ToolWindowFactory, DumbAware {
toolWindow.isShowStripeButton = true
}
toolWindow.setAvailable(available)
toolWindow.isAvailable = available
}
private fun updateContent(project: Project, toolWindow: ToolWindow) {
@@ -86,8 +85,9 @@ abstract class VcsToolWindowFactory : ToolWindowFactory, DumbAware {
}
}
private fun getExtensions(project: Project, toolWindow: ToolWindow): Collection<ChangesViewContentEP> =
ChangesViewContentEP.EP_NAME.getExtensions(project).filter { getToolWindowIdFor(project, it.tabName) == toolWindow.id }
private fun getExtensions(project: Project, toolWindow: ToolWindow): Collection<ChangesViewContentEP> {
return ChangesViewContentEP.EP_NAME.getExtensions(project).filter { getToolWindowIdFor(project, it.tabName) == toolWindow.id }
}
private fun createExtensionContent(project: Project, extension: ChangesViewContentEP): Content {
val displayName: String = extension.newDisplayNameSupplierInstance(project)?.get() ?: extension.tabName
@@ -103,6 +103,7 @@ abstract class VcsToolWindowFactory : ToolWindowFactory, DumbAware {
}
companion object {
internal val Project.vcsManager: ProjectLevelVcsManager get() = ProjectLevelVcsManager.getInstance(this)
internal val Project.vcsManager: ProjectLevelVcsManager
get() = ProjectLevelVcsManager.getInstance(this)
}
}
@@ -1,21 +1,6 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.lang.ant.config.execution;
import com.intellij.concurrency.JobScheduler;
import com.intellij.execution.CantRunException;
import com.intellij.execution.ExecutionException;
import com.intellij.execution.configurations.GeneralCommandLine;
@@ -45,6 +30,7 @@ import com.intellij.openapi.vfs.VfsUtilCore;
import com.intellij.openapi.vfs.encoding.EncodingProjectManager;
import com.intellij.openapi.wm.StatusBar;
import com.intellij.openapi.wm.WindowManager;
import com.intellij.util.concurrency.AppExecutorUtil;
import com.intellij.util.concurrency.FutureResult;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -309,7 +295,7 @@ public final class ExecutionHandler {
}
public void start(final long delay) {
JobScheduler.getScheduler().schedule(this, delay, TimeUnit.MILLISECONDS);
AppExecutorUtil.getAppScheduledExecutorService().schedule(this, delay, TimeUnit.MILLISECONDS);
}
}