give BoundedExecutor a name to help debug "already shutdown" errors appcode/163.3041 clion/163.3043
authorAlexey Kudravtsev <cdr@intellij.com>
Mon, 22 Aug 2016 08:40:53 +0000 (11:40 +0300)
committerAlexey Kudravtsev <cdr@intellij.com>
Mon, 22 Aug 2016 08:40:53 +0000 (11:40 +0300)
39 files changed:
java/compiler/impl/src/com/intellij/compiler/impl/ProblemsViewImpl.java
java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java
java/compiler/impl/src/com/intellij/compiler/server/DefaultMessageHandler.java
jps/jps-builders/src/org/jetbrains/jps/cmdline/BuildSession.java
jps/jps-builders/src/org/jetbrains/jps/incremental/IncProjectBuilder.java
jps/jps-builders/src/org/jetbrains/jps/incremental/java/JavaBuilder.java
jps/model-serialization/src/org/jetbrains/jps/model/serialization/JpsProjectLoader.java
platform/core-api/src/com/intellij/openapi/util/SimpleTimer.java
platform/core-impl/src/com/intellij/psi/impl/DocumentCommitThread.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/notification/ExternalSystemNotificationManager.java
platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionViewPsiTreeChangeAdapter.java
platform/lang-impl/src/com/intellij/psi/codeStyle/DetectableIndentOptionsProvider.java
platform/lang-impl/src/com/intellij/ui/DeferredIconImpl.java
platform/lang-impl/src/com/intellij/util/download/impl/FileDownloaderImpl.java
platform/lang-impl/src/com/intellij/util/indexing/IndexInfrastructure.java
platform/platform-api/src/com/intellij/openapi/actionSystem/AsyncUpdateAction.java
platform/platform-api/src/com/intellij/util/Alarm.java
platform/platform-impl/src/com/intellij/ide/customize/CustomizeFeaturedPluginsStepPanel.java
platform/platform-impl/src/com/intellij/openapi/application/Preloader.java
platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/text/AsyncEditorLoader.java
platform/platform-impl/src/com/intellij/openapi/fileTypes/impl/FileTypeManagerImpl.java
platform/platform-impl/src/com/intellij/openapi/project/FileContentQueue.java
platform/platform-impl/src/com/intellij/openapi/vfs/encoding/EncodingManagerImpl.java
platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/RefreshQueueImpl.java
platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java
platform/platform-impl/src/com/intellij/ui/EditorNotificationsImpl.java
platform/platform-impl/src/com/intellij/util/MergingBackgroundExecutor.java
platform/platform-tests/testSrc/com/intellij/util/concurrency/BoundedScheduledExecutorTest.java
platform/platform-tests/testSrc/com/intellij/util/concurrency/BoundedTaskExecutorTest.java
platform/remote-servers/impl/src/com/intellij/remoteServer/agent/impl/RemoteAgentThreadProxyCreator.java
platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/ServerTaskExecutorImpl.java
platform/util/src/com/intellij/util/concurrency/AppExecutorUtil.java
platform/util/src/com/intellij/util/concurrency/BoundedScheduledExecutorService.java
platform/util/src/com/intellij/util/concurrency/BoundedTaskExecutor.java
platform/util/src/com/intellij/util/concurrency/SequentialTaskExecutor.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java
plugins/ant/src/com/intellij/lang/ant/segments/Extractor.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/dsl/GroovyDslFileIndex.java
plugins/groovy/src/org/jetbrains/plugins/groovy/mvc/MvcModuleStructureSynchronizer.java

index 3e6c5f64b6cb3d04af73675b276d8d91333d822b..62e5917b2d2c662760a94ee8296c4e89ac782e81 100644 (file)
@@ -52,7 +52,7 @@ public class ProblemsViewImpl extends ProblemsView{
   private static final EnumSet<ErrorTreeElementKind> ALL_MESSAGE_KINDS = EnumSet.allOf(ErrorTreeElementKind.class);
 
   private final ProblemsViewPanel myPanel;
-  private final ExecutorService myViewUpdater = SequentialTaskExecutor.createSequentialApplicationPoolExecutor();
+  private final ExecutorService myViewUpdater = SequentialTaskExecutor.createSequentialApplicationPoolExecutor("ProblemsView pool");
   private final Icon myActiveIcon = AllIcons.Toolwindows.Problems;
   private final Icon myPassiveIcon = IconLoader.getDisabledIcon(myActiveIcon);
 
index 1f08d8913a5c17d522509aa7a88fa1134a94c32e..f56391e3a0c88e62019b71949da5c5a371b0c457 100644 (file)
@@ -160,7 +160,7 @@ public class BuildManager implements Disposable {
   private final Map<String, Future<Pair<RequestFuture<PreloadedProcessMessageHandler>, OSProcessHandler>>> myPreloadedBuilds =
     Collections.synchronizedMap(new HashMap<String, Future<Pair<RequestFuture<PreloadedProcessMessageHandler>, OSProcessHandler>>>());
   private final BuildProcessClasspathManager myClasspathManager = new BuildProcessClasspathManager();
-  private final ExecutorService myRequestsProcessor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor();
+  private final ExecutorService myRequestsProcessor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor("BuildManager requestProcessor pool");
   private final Map<String, ProjectData> myProjectDataMap = Collections.synchronizedMap(new HashMap<String, ProjectData>());
 
   private final BuildManagerPeriodicTask myAutoMakeTask = new BuildManagerPeriodicTask(this) {
@@ -856,7 +856,7 @@ public class BuildManager implements Disposable {
     synchronized (myProjectDataMap) {
       ProjectData data = myProjectDataMap.get(projectPath);
       if (data == null) {
-        data = new ProjectData(SequentialTaskExecutor.createSequentialApplicationPoolExecutor());
+        data = new ProjectData(SequentialTaskExecutor.createSequentialApplicationPoolExecutor("BuildManager pool"));
         myProjectDataMap.put(projectPath, data);
       }
       return data;
index 5d392abe3213901913b774f524aa65551e9c4abd..4105ecbffb7b213bf17c8886fa3d29c0f1513e42 100644 (file)
@@ -51,7 +51,7 @@ public abstract class DefaultMessageHandler implements BuilderMessageHandler {
   private static final Logger LOG = Logger.getInstance("#com.intellij.compiler.server.DefaultMessageHandler");
   public static final long CONSTANT_SEARCH_TIME_LIMIT = 60 * 1000L; // one minute
   private final Project myProject;
-  private final ExecutorService myTaskExecutor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor();
+  private final ExecutorService myTaskExecutor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor("DefaultMessageHandler pool");
   private volatile long myConstantSearchTime = 0L;
 
   protected DefaultMessageHandler(Project project) {
index c4fa71e86864ee1ca4ae095c185741889ec05086..64af4b986c5f847308d614dd391b7fa1858de1b5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2015 JetBrains s.r.o.
+ * 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.
@@ -649,7 +649,7 @@ final class BuildSession implements Runnable, CanceledStatus {
     private final Semaphore myProcessingEnabled = new Semaphore();
 
     private EventsProcessor() {
-      super(SharedThreadPool.getInstance());
+      super("BuildSession.EventsProcessor.EventsProcessor pool", SharedThreadPool.getInstance());
       myProcessingEnabled.down();
       execute(new Runnable() {
         @Override
index 3a8ac28d05e820d182175eee9db4f797eedeb36c..9c701afd520e8a078ccc6f00afd0cb145366a636 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2014 JetBrains s.r.o.
+ * 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.
@@ -783,7 +783,7 @@ public class IncProjectBuilder {
   }
 
   private class BuildParallelizer {
-    private final BoundedTaskExecutor myParallelBuildExecutor = new BoundedTaskExecutor(SharedThreadPool.getInstance(), MAX_BUILDER_THREADS);
+    private final BoundedTaskExecutor myParallelBuildExecutor = new BoundedTaskExecutor("IncProjectBuilder executor pool", SharedThreadPool.getInstance(), MAX_BUILDER_THREADS);
     private final CompileContext myContext;
     private final AtomicReference<Throwable> myException = new AtomicReference<Throwable>();
     private final Object myQueueLock = new Object();
index cd08b0e24d0c9e2401614d5e0a0f30dcbcd4e39e..e3dfe79202d30b04bf43946bcde6009ae8e2efd8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2015 JetBrains s.r.o.
+ * 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.
@@ -61,8 +61,7 @@ import org.jetbrains.jps.model.serialization.PathMacroUtil;
 import org.jetbrains.jps.service.JpsServiceManager;
 import org.jetbrains.jps.service.SharedThreadPool;
 
-import javax.tools.Diagnostic;
-import javax.tools.JavaFileObject;
+import javax.tools.*;
 import java.io.*;
 import java.net.ServerSocket;
 import java.util.*;
@@ -131,7 +130,7 @@ public class JavaBuilder extends ModuleLevelBuilder {
 
   public JavaBuilder(Executor tasksExecutor) {
     super(BuilderCategory.TRANSLATOR);
-    myTaskRunner = new SequentialTaskExecutor(tasksExecutor);
+    myTaskRunner = new SequentialTaskExecutor("JavaBuilder pool", tasksExecutor);
     //add here class processors in the sequence they should be executed
   }
 
index 98b7f30e788ae48bc5716bae04810049c6009937..a69eb20d8d9d63fc8ca1ae20b997121007058628 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2015 JetBrains s.r.o.
+ * 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.
@@ -61,7 +61,7 @@ import java.util.concurrent.Future;
  */
 public class JpsProjectLoader extends JpsLoaderBase {
   private static final Logger LOG = Logger.getInstance(JpsProjectLoader.class);
-  private static final BoundedTaskExecutor ourThreadPool = new BoundedTaskExecutor(SharedThreadPool.getInstance(), Runtime.getRuntime().availableProcessors());
+  private static final BoundedTaskExecutor ourThreadPool = new BoundedTaskExecutor("JpsProjectLoader pool",SharedThreadPool.getInstance(), Runtime.getRuntime().availableProcessors());
   public static final String CLASSPATH_ATTRIBUTE = "classpath";
   public static final String CLASSPATH_DIR_ATTRIBUTE = "classpath-dir";
   private final JpsProject myProject;
index 351c717d962cf7f4f66e1dbeaec0edd67d77a5e7..4c1d867d4648bea32077f5a7dbac80d3140e954d 100644 (file)
@@ -29,7 +29,7 @@ public class SimpleTimer {
   private static final SimpleTimer ourInstance = newInstance("Shared");
 
   // restrict threads running tasks to one since same-delay-tasks must be executed sequentially
-  private final ScheduledExecutorService myScheduledExecutorService = AppExecutorUtil.createBoundedScheduledExecutorService(1);
+  private final ScheduledExecutorService myScheduledExecutorService = AppExecutorUtil.createBoundedScheduledExecutorService("SimpleTimer pool",1);
   @NotNull private final String myName;
 
   private SimpleTimer(@NotNull String name) {
index fa33d0926c78ab2eba62ef51a1f250976fa7c47d..71658fec6bbc220a251cb96d6662955b69227491 100644 (file)
@@ -78,7 +78,7 @@ public class DocumentCommitThread implements Runnable, Disposable, DocumentCommi
   private static final Logger LOG = Logger.getInstance("#com.intellij.psi.impl.DocumentCommitThread");
   private static final String SYNC_COMMIT_REASON = "Sync commit";
 
-  private final ExecutorService executor = new BoundedTaskExecutor(PooledThreadExecutor.INSTANCE, 1, this);
+  private final ExecutorService executor = new BoundedTaskExecutor("Document committing pool", PooledThreadExecutor.INSTANCE, 1, this);
   private final Object lock = new Object();
   private final HashSetQueue<CommitTask> documentsToCommit = new HashSetQueue<CommitTask>();      // guarded by lock
   private final HashSetQueue<CommitTask> documentsToApplyInEDT = new HashSetQueue<CommitTask>();  // guarded by lock
index eda05e2473f3111aebe8854cb22556154527900c..0a18419b8b9e691a2ebf6bebe3f6cb0d719615a1 100644 (file)
@@ -75,7 +75,7 @@ import java.util.concurrent.ExecutorService;
 public class ExternalSystemNotificationManager implements Disposable {
   @NotNull private static final Key<Pair<NotificationSource, ProjectSystemId>> CONTENT_ID_KEY = Key.create("CONTENT_ID");
 
-  @NotNull private final ExecutorService myUpdater = SequentialTaskExecutor.createSequentialApplicationPoolExecutor();
+  @NotNull private final ExecutorService myUpdater = SequentialTaskExecutor.createSequentialApplicationPoolExecutor("ExternalSystemNotificationManager pool");
 
   @NotNull private final Project myProject;
   @NotNull private final Set<Notification> myNotifications;
index 647534430e67b2e5bc7daa52ef7cec7f3d9ea743..cd1435951ce57ff4da1a42266e5f8d81c9ea7256 100644 (file)
@@ -58,7 +58,7 @@ class InspectionViewPsiTreeChangeAdapter extends PsiTreeChangeAdapter {
 
   public InspectionViewPsiTreeChangeAdapter(@NotNull InspectionResultsView view) {
     myView = view;
-    myExecutor = new BoundedTaskExecutor(AppExecutorUtil.getAppExecutorService(), JobSchedulerImpl.CORES_COUNT, myView);
+    myExecutor = new BoundedTaskExecutor("Updating Inspection View pool", AppExecutorUtil.getAppExecutorService(), JobSchedulerImpl.CORES_COUNT, myView);
     myUpdater = new MergingUpdateQueue("inspection.view.psi.update.listener",
                                        300,
                                        true,
index 2c70c22bba607b9b27c7a606cd3e0e9742e84afc..96739157dc686243ac8689efea08b3415f8cfb07 100644 (file)
@@ -50,7 +50,7 @@ import static com.intellij.psi.codeStyle.EditorNotificationInfo.ActionLabelData;
  */
 public class DetectableIndentOptionsProvider extends FileIndentOptionsProvider {
   
-  private static final ExecutorService BOUNDED_EXECUTOR = AppExecutorUtil.createBoundedApplicationPoolExecutor(1);
+  private static final ExecutorService BOUNDED_EXECUTOR = AppExecutorUtil.createBoundedApplicationPoolExecutor("DetectableIndentOptionsProvider pool",1);
   
   private boolean myIsEnabledInTest;
   private final List<VirtualFile> myAcceptedFiles = new WeakList<>();
index 4f82b5d6ad2b84655db1623bd7dc775717028c57..3556c5a6551db18b034f9d601a660a0ff55ed32d 100644 (file)
@@ -63,7 +63,7 @@ public class DeferredIconImpl<T> implements DeferredIcon, RetrievableIcon, Scala
   private float myScale = 1f;
   private Icon myOriginalDeferredIcon = null;
 
-  private static final Executor ourIconsCalculatingExecutor = AppExecutorUtil.createBoundedApplicationPoolExecutor(1);
+  private static final Executor ourIconsCalculatingExecutor = AppExecutorUtil.createBoundedApplicationPoolExecutor("ourIconsCalculating pool",1);
 
   private final IconListener<T> myEvalListener;
   private static final TransferToEDTQueue<Runnable> ourLaterInvocator = TransferToEDTQueue.createRunnableMerger("Deferred icon later invocator", 200);
index 2ebbbb10850357b47a2bed2349360eba71128b87..8a26b831503a5104f3c7657ce3eb48bd97858a4a 100644 (file)
@@ -31,7 +31,6 @@ import com.intellij.openapi.progress.ProcessCanceledException;
 import com.intellij.openapi.progress.ProgressIndicator;
 import com.intellij.openapi.progress.ProgressManager;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.util.Condition;
 import com.intellij.openapi.util.Pair;
 import com.intellij.openapi.util.Ref;
 import com.intellij.openapi.util.io.FileUtil;
@@ -51,7 +50,6 @@ import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.concurrent.Callable;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Future;
@@ -164,7 +162,7 @@ public class FileDownloaderImpl implements FileDownloader {
       int maxParallelDownloads = Runtime.getRuntime().availableProcessors();
       LOG.debug("Downloading " + myFileDescriptions.size() + " files using " + maxParallelDownloads + " threads");
       long start = System.currentTimeMillis();
-      ExecutorService executor = AppExecutorUtil.createBoundedApplicationPoolExecutor(maxParallelDownloads);
+      ExecutorService executor = AppExecutorUtil.createBoundedApplicationPoolExecutor("FileDownloaderImpl pool", maxParallelDownloads);
       List<Future<Void>> results = new ArrayList<>();
       final AtomicLong totalSize = new AtomicLong();
       for (final DownloadableFileDescription description : myFileDescriptions) {
index 4e6d6278533e2955bc613314ec3da488de9f76d2..f22079bdd05a04385ab620849df0a8320693c3c3 100644 (file)
@@ -54,7 +54,7 @@ public class IndexInfrastructure {
   private static final boolean ourDoParallelIndicesInitialization = SystemProperties
     .getBooleanProperty("idea.parallel.indices.initialization", false);
   public static final boolean ourDoAsyncIndicesInitialization = SystemProperties.getBooleanProperty("idea.async.indices.initialization", true);
-  private static final ExecutorService ourGenesisExecutor = new SequentialTaskExecutor(PooledThreadExecutor.INSTANCE);
+  private static final ExecutorService ourGenesisExecutor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor("IndexInfrastructure pool");
 
   private IndexInfrastructure() {
   }
@@ -187,7 +187,7 @@ public class IndexInfrastructure {
       CountDownLatch proceedLatch = new CountDownLatch(numberOfTasksToExecute);
 
       if (ourDoParallelIndicesInitialization) {
-        BoundedTaskExecutor taskExecutor = new BoundedTaskExecutor(PooledThreadExecutor.INSTANCE,
+        BoundedTaskExecutor taskExecutor = new BoundedTaskExecutor("IndexInfrastructure.DataInitialization.runParallelNestedInitializationTasks", PooledThreadExecutor.INSTANCE,
                                                                    CacheUpdateRunner.indexingThreadCount());
 
         for (ThrowableRunnable callable : myNestedInitializationTasks) {
index d13e4826fdea44ba29d4bc1602375fb753b2b221..3e016ef74a672708f8e85d0624fea6fcb1ac7754 100644 (file)
@@ -31,7 +31,7 @@ import java.util.concurrent.ExecutorService;
 public abstract class AsyncUpdateAction<T> extends AnAction {
   private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.actionSystem.AsyncUpdateAction");
 
-  private static final ExecutorService ourUpdaterService = AppExecutorUtil.createBoundedApplicationPoolExecutor(1);
+  private static final ExecutorService ourUpdaterService = AppExecutorUtil.createBoundedApplicationPoolExecutor("AsyncUpdateAction pool", 1);
 
   // Async update
   @Override
index 777433657fc896b6e76431e8e57d93c124e32ac5..85149ab02a6f7ea18cb42f22e4e9bf5610d3613e 100644 (file)
@@ -135,7 +135,7 @@ public class Alarm implements Disposable {
                         // or pass to app pooled thread.
                         // have to restrict the number of running tasks because otherwise the (implicit) contract of
                         // "addRequests with the same delay are executed in order" will be broken
-                        AppExecutorUtil.createBoundedScheduledExecutorService(1);
+                        AppExecutorUtil.createBoundedScheduledExecutorService("Alarm pool",1);
 
     if (parentDisposable != null) {
       Disposer.register(parentDisposable, this);
index f1ec6f6e385b83a211ce2c6e001dcfc8a41ffd73..545bd4380704e89d996763798b0de361ccfbf005 100644 (file)
@@ -47,7 +47,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
 
 public class CustomizeFeaturedPluginsStepPanel extends AbstractCustomizeWizardStep {
   private static final int COLS = 3;
-  private static final ExecutorService ourService = AppExecutorUtil.createBoundedApplicationPoolExecutor(4);
+  private static final ExecutorService ourService = AppExecutorUtil.createBoundedApplicationPoolExecutor("CustomizeFeaturedPluginsStepPanel pool",4);
 
   public final AtomicBoolean myCanceled = new AtomicBoolean(false);
   private final PluginGroups myPluginGroups;
index aca5110007528ec400d39383b314fb41d6b5786a..ff334178cadfd785c67700ae1eb8a7ea6e081f57 100644 (file)
@@ -34,7 +34,7 @@ import java.util.concurrent.Executor;
  */
 public class Preloader implements ApplicationComponent {
   private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.application.Preloader");
-  private final Executor myExecutor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor();
+  private final Executor myExecutor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor("com.intellij.openapi.application.Preloader pool");
   private final ProgressIndicator myIndicator = new ProgressIndicatorBase();
   private final ProgressIndicator myWrappingIndicator = new AbstractProgressIndicatorBase() {
     @Override
index c917e720f32f447157121904153ab3c0f0c7dda7..8340e4e494add58c3a7bf9680d42de40f0ee603b 100644 (file)
@@ -41,7 +41,7 @@ import java.util.List;
 import java.util.concurrent.ExecutorService;
 
 public class AsyncEditorLoader {
-  private static final ExecutorService ourExecutor = AppExecutorUtil.createBoundedApplicationPoolExecutor(2);
+  private static final ExecutorService ourExecutor = AppExecutorUtil.createBoundedApplicationPoolExecutor("AsyncEditorLoader pool",2);
   private static final Key<AsyncEditorLoader> ASYNC_LOADER = Key.create("ASYNC_LOADER");
   private static boolean ourCreatingAsyncEditor;
   @NotNull private final Editor myEditor;
index ab86e7fa62a5dc374ee676030bfc6b53d30da755..5ebd4a51f234cc96f94cf169e98b41fdafe0cfd5 100644 (file)
@@ -355,7 +355,7 @@ public class FileTypeManagerImpl extends FileTypeManagerEx implements Persistent
     System.out.println(message + " - "+Thread.currentThread());
   }
 
-  private final BoundedTaskExecutor reDetectExecutor = new BoundedTaskExecutor(PooledThreadExecutor.INSTANCE, 1, this);
+  private final BoundedTaskExecutor reDetectExecutor = new BoundedTaskExecutor("FileTypeManager redetect pool", PooledThreadExecutor.INSTANCE, 1, this);
   private final BlockingQueue<VirtualFile> filesToRedetect = new LinkedBlockingDeque<>();
 
   private void awakeReDetectExecutor() {
index 597b2bc08e77236c79512475679c787f2b0f4726..4a5518af5d5bacebe8973e82d4e307e88c980cb9 100644 (file)
@@ -49,7 +49,7 @@ public class FileContentQueue {
 
   private static final int ourTasksNumber =
     SystemProperties.getBooleanProperty("idea.allow.parallel.file.reading", true) ? CacheUpdateRunner.indexingThreadCount() : 1;
-  private static final ExecutorService ourExecutor = AppExecutorUtil.createBoundedApplicationPoolExecutor(ourTasksNumber);
+  private static final ExecutorService ourExecutor = AppExecutorUtil.createBoundedApplicationPoolExecutor("FileContentQueue pool", ourTasksNumber);
 
   // Unbounded (!)
   private final LinkedBlockingDeque<FileContent> myLoadedContents = new LinkedBlockingDeque<>();
index ea9bcd2816da4d4371a372ce1e966c4a38c297ec..4a54baa4a5f188e9f7941eb5f292f544b341bdda 100644 (file)
@@ -91,7 +91,7 @@ public class EncodingManagerImpl extends EncodingManager implements PersistentSt
   private static final Key<Charset> CACHED_CHARSET_FROM_CONTENT = Key.create("CACHED_CHARSET_FROM_CONTENT");
 
   private final BoundedTaskExecutor changedDocumentExecutor =
-    new BoundedTaskExecutor(PooledThreadExecutor.INSTANCE, JobSchedulerImpl.CORES_COUNT, this);
+    new BoundedTaskExecutor("EncodingManagerImpl document pool", PooledThreadExecutor.INSTANCE, JobSchedulerImpl.CORES_COUNT, this);
 
   public EncodingManagerImpl(@NotNull EditorFactory editorFactory) {
     editorFactory.getEventMulticaster().addDocumentListener(new DocumentAdapter() {
index e0bd6fee08720073ae6f251dd95d4b061f25aed8..c5e5a9d95e5429245e6562128dab91b166a4b56d 100644 (file)
@@ -39,7 +39,7 @@ import java.util.concurrent.ExecutorService;
 public class RefreshQueueImpl extends RefreshQueue implements Disposable {
   private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.vfs.newvfs.RefreshQueueImpl");
 
-  private final ExecutorService myQueue = new BoundedTaskExecutor(PooledThreadExecutor.INSTANCE, 1, this);
+  private final ExecutorService myQueue = new BoundedTaskExecutor("RefreshQueue pool", PooledThreadExecutor.INSTANCE, 1, this);
   private final ProgressIndicator myRefreshIndicator = RefreshProgress.create(VfsBundle.message("file.synchronize.progress"));
   private final TLongObjectHashMap<RefreshSession> mySessions = new TLongObjectHashMap<>();
   private final FrequentEventDetector myEventCounter = new FrequentEventDetector(100, 100, FrequentEventDetector.Level.WARN);
index 9a0a45b89ac2302658ec3224895d6cde468cde82..491e2c0c9a77618e4eb15a8ecd96f64815f4c38a 100644 (file)
@@ -282,7 +282,7 @@ public class FSRecords implements Forceable {
           @NotNull
           @Override
           protected ExecutorService createExecutor() {
-            return AppExecutorUtil.createBoundedApplicationPoolExecutor(1);
+            return AppExecutorUtil.createBoundedApplicationPoolExecutor("FSRecords pool",1);
           }
         }; // sources usually zipped with 4x ratio
         myContentHashesEnumerator = weHaveContentHashes ? new ContentHashesUtil.HashEnumerator(contentsHashesFile, storageLockContext): null;
index 6c0781e88792cd622d4c1b6fb13f12498cb95fe4..eebdbd6d91d2f229df470d28189175db8c658128 100644 (file)
@@ -50,7 +50,7 @@ import java.util.concurrent.ExecutorService;
 public class EditorNotificationsImpl extends EditorNotifications {
   private static final ExtensionPointName<Provider> EXTENSION_POINT_NAME = ExtensionPointName.create("com.intellij.editorNotificationProvider");
   private static final Key<WeakReference<ProgressIndicator>> CURRENT_UPDATES = Key.create("CURRENT_UPDATES");
-  private static final ExecutorService ourExecutor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor();
+  private static final ExecutorService ourExecutor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor("EditorNotificationsImpl pool");
   private final MergingUpdateQueue myUpdateMerger;
 
   public EditorNotificationsImpl(Project project) {
index cabb376004cecb76c9366122f38ff7772e956aa1..d051a0d490722aedfacd506e95ef924e5099794a 100644 (file)
@@ -33,9 +33,9 @@ public class MergingBackgroundExecutor<T> {
   private final Consumer<T> myConsumer;
   private final ExecutorService myExecutorService;
 
-  public MergingBackgroundExecutor(int maxThreads, @NotNull Consumer<T> consumer) {
+  public MergingBackgroundExecutor(@NotNull String name, int maxThreads, @NotNull Consumer<T> consumer) {
     myConsumer = consumer;
-    myExecutorService = AppExecutorUtil.createBoundedApplicationPoolExecutor(maxThreads);
+    myExecutorService = AppExecutorUtil.createBoundedApplicationPoolExecutor(name, maxThreads);
   }
 
 
@@ -44,7 +44,7 @@ public class MergingBackgroundExecutor<T> {
   }
 
   @NotNull
-  public static MergingBackgroundExecutor<Runnable> newRunnableExecutor(int maxThreads) {
-    return new MergingBackgroundExecutor<>(maxThreads, runnable -> runnable.run());
+  public static MergingBackgroundExecutor<Runnable> newRunnableExecutor(@NotNull String name, int maxThreads) {
+    return new MergingBackgroundExecutor<>(name,maxThreads, runnable -> runnable.run());
   }
 }
index 9a9621af8c27699f8acbb6c10b142d40623865ae..42fe097d0309095ec4ed256a0fdcb276e2f9876b 100644 (file)
@@ -62,8 +62,8 @@ public class BoundedScheduledExecutorTest extends TestCase {
   }
 
   @NotNull
-  private static BoundedScheduledExecutorService createBoundedScheduledExecutor(@NotNull ExecutorService backendExecutor, int maxTasks) {
-    return new BoundedScheduledExecutorService(backendExecutor, maxTasks);
+  private BoundedScheduledExecutorService createBoundedScheduledExecutor(@NotNull ExecutorService backendExecutor, int maxTasks) {
+    return new BoundedScheduledExecutorService(getName(), backendExecutor, maxTasks);
   }
 
   public void testSubmitsAreReallyBound() throws InterruptedException, ExecutionException {
index 84448f6f7b70c61147b62ebfc0b938bb86bb1459..3e39ee7e91ad99854948b364d8c2c93bbbc5fb25 100644 (file)
@@ -72,7 +72,7 @@ public class BoundedTaskExecutorTest extends TestCase {
     for (int maxTasks=1; maxTasks<5;maxTasks++) {
       System.out.println("maxTasks = " + maxTasks);
       ExecutorService backendExecutor = Executors.newCachedThreadPool(ConcurrencyUtil.newNamedThreadFactory("maxTasks = " + maxTasks));
-      BoundedTaskExecutor executor = new BoundedTaskExecutor(backendExecutor, maxTasks);
+      BoundedTaskExecutor executor = new BoundedTaskExecutor(getName(), backendExecutor, maxTasks);
       AtomicInteger running = new AtomicInteger();
       AtomicInteger max = new AtomicInteger();
       AtomicInteger executed = new AtomicInteger();
@@ -102,7 +102,7 @@ public class BoundedTaskExecutorTest extends TestCase {
 
   public void testCallableReallyReturnsValue() throws Exception{
     ExecutorService backendExecutor = Executors.newCachedThreadPool(ConcurrencyUtil.newNamedThreadFactory(getName()));
-    BoundedTaskExecutor executor = new BoundedTaskExecutor(backendExecutor, 1);
+    BoundedTaskExecutor executor = new BoundedTaskExecutor(getName(),backendExecutor, 1);
 
     Future<Integer> f1 = executor.submit(() -> 42);
     Integer result = f1.get();
@@ -116,7 +116,7 @@ public class BoundedTaskExecutorTest extends TestCase {
   public void testEarlyCancelPreventsRunning() throws ExecutionException, InterruptedException {
     AtomicBoolean run = new AtomicBoolean();
     ExecutorService backendExecutor = Executors.newCachedThreadPool(ConcurrencyUtil.newNamedThreadFactory(getName()));
-    BoundedTaskExecutor executor = new BoundedTaskExecutor(backendExecutor, 1);
+    BoundedTaskExecutor executor = new BoundedTaskExecutor(getName(),backendExecutor, 1);
 
     int delay = 1000;
     Future<?> s1 = executor.submit(() -> TimeoutUtil.sleep(delay));
@@ -139,7 +139,7 @@ public class BoundedTaskExecutorTest extends TestCase {
   public void testStressWhenSomeTasksCallOtherTasksGet() throws ExecutionException, InterruptedException {
     ExecutorService backendExecutor = Executors.newCachedThreadPool(ConcurrencyUtil.newNamedThreadFactory(getName()));
     for (int maxSimultaneousTasks = 1; maxSimultaneousTasks<20; maxSimultaneousTasks++) {
-      BoundedTaskExecutor executor = new BoundedTaskExecutor(backendExecutor, maxSimultaneousTasks);
+      BoundedTaskExecutor executor = new BoundedTaskExecutor(getName(),backendExecutor, maxSimultaneousTasks);
       AtomicInteger running = new AtomicInteger();
       AtomicInteger maxThreads = new AtomicInteger();
 
@@ -185,7 +185,7 @@ public class BoundedTaskExecutorTest extends TestCase {
 
   public void testSequentialSubmitsMustExecuteSequentially() throws ExecutionException, InterruptedException {
     ExecutorService backendExecutor = Executors.newCachedThreadPool(ConcurrencyUtil.newNamedThreadFactory(getName()));
-    BoundedTaskExecutor executor = new BoundedTaskExecutor(backendExecutor, 1);
+    BoundedTaskExecutor executor = new BoundedTaskExecutor(getName(),backendExecutor, 1);
     int N = 100000;
     StringBuffer log = new StringBuffer(N*4);
     StringBuilder expected = new StringBuilder(N * 4);
@@ -212,7 +212,7 @@ public class BoundedTaskExecutorTest extends TestCase {
     ExecutorService backendExecutor = Executors.newCachedThreadPool(ConcurrencyUtil.newNamedThreadFactory(getName()));
     int maxSimultaneousTasks = 1;
     final Disposable myDisposable = Disposer.newDisposable();
-    BoundedTaskExecutor executor = new BoundedTaskExecutor(backendExecutor, maxSimultaneousTasks, myDisposable);
+    BoundedTaskExecutor executor = new BoundedTaskExecutor(getName(), backendExecutor, maxSimultaneousTasks, myDisposable);
     AtomicInteger running = new AtomicInteger();
     AtomicInteger maxThreads = new AtomicInteger();
 
@@ -313,7 +313,7 @@ public class BoundedTaskExecutorTest extends TestCase {
   }
 
   public void testShutdownNowMustCancel() throws ExecutionException, InterruptedException {
-    ExecutorService executor = new BoundedTaskExecutor(PooledThreadExecutor.INSTANCE, 1);
+    ExecutorService executor = new BoundedTaskExecutor(getName(),PooledThreadExecutor.INSTANCE, 1);
     int N = 100000;
     StringBuffer log = new StringBuffer(N*4);
 
@@ -353,7 +353,7 @@ public class BoundedTaskExecutorTest extends TestCase {
   }
 
   public void testShutdownMustDisableSubmit() throws ExecutionException, InterruptedException {
-    ExecutorService executor = new BoundedTaskExecutor(PooledThreadExecutor.INSTANCE, 1);
+    ExecutorService executor = new BoundedTaskExecutor(getName(),PooledThreadExecutor.INSTANCE, 1);
     int N = 100000;
     StringBuffer log = new StringBuffer(N*4);
 
@@ -390,7 +390,7 @@ public class BoundedTaskExecutorTest extends TestCase {
   public void testNoExtraThreadsAreEverCreated() throws ExecutionException, InterruptedException {
     for (int nMaxThreads=1; nMaxThreads<10; nMaxThreads++) {
       System.out.println("nMaxThreads = " + nMaxThreads);
-      ExecutorService executor = AppExecutorUtil.createBoundedApplicationPoolExecutor(nMaxThreads);
+      ExecutorService executor = AppExecutorUtil.createBoundedApplicationPoolExecutor(getName(),nMaxThreads);
       int N = 1000000;
       Set<Thread> workers = ContainerUtil.newConcurrentSet();
 
@@ -454,7 +454,7 @@ public class BoundedTaskExecutorTest extends TestCase {
   public void testAwaitTerminationDoesWait() throws InterruptedException {
     for (int maxTasks=1; maxTasks<10; maxTasks++) {
       System.out.println("maxTasks = " + maxTasks);
-      ExecutorService executor = new BoundedTaskExecutor(PooledThreadExecutor.INSTANCE, maxTasks);
+      ExecutorService executor = new BoundedTaskExecutor(getName(),PooledThreadExecutor.INSTANCE, maxTasks);
       int N = 1000;
       StringBuffer log = new StringBuffer(N*4);
 
@@ -480,7 +480,7 @@ public class BoundedTaskExecutorTest extends TestCase {
   }
 
   public void testAwaitTerminationDoesNotCompletePrematurely() throws InterruptedException {
-    ExecutorService executor2 = new BoundedTaskExecutor(PooledThreadExecutor.INSTANCE, 1);
+    ExecutorService executor2 = new BoundedTaskExecutor(getName(),PooledThreadExecutor.INSTANCE, 1);
     Future<?> future = executor2.submit(() -> TimeoutUtil.sleep(10000));
     executor2.shutdown();
     assertFalse(executor2.awaitTermination(1, TimeUnit.SECONDS));
index 01babe3cb46e26f008c4e7b05050f5b694f117a1..f9f48be88201438d3f23d59bdb93671b06932b6b 100644 (file)
@@ -40,7 +40,7 @@ public class RemoteAgentThreadProxyCreator {
     return agentInterface.cast(Proxy.newProxyInstance(callerClassLoader,
                                                       new Class[]{agentInterface},
                                                       new ThreadInvocationHandler(
-                                                        SequentialTaskExecutor.createSequentialApplicationPoolExecutor(),
+                                                        SequentialTaskExecutor.createSequentialApplicationPoolExecutor("RemoteAgentThreadProxyCreator pool"),
                                                         callerClassLoader, agentInstance,
                                                         myPreWrapperCreator
                                                       )));
index 7afe28aa7b73026b2cc91e6a0d58a38c1cfded3f..986ed1c2fa1083db86bdc8642414fb55326497e9 100644 (file)
@@ -32,7 +32,7 @@ public class ServerTaskExecutorImpl implements ServerTaskExecutor {
   private final ExecutorService myTaskExecutor;
 
   public ServerTaskExecutorImpl() {
-    myTaskExecutor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor();
+    myTaskExecutor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor("ServerTaskExecutorImpl pool");
   }
 
   @Override
index f47aa293af1e221fbcd32b7dd85a0739c6ffac64..dcb06e06f4cca312ea696893d4d003d7b3c754a7 100644 (file)
@@ -58,8 +58,8 @@ public class AppExecutorUtil {
    * and execute them in parallel in the application pool (see {@link #getAppExecutorService()} not more than at {@code maxSimultaneousTasks} at a time.
    */
   @NotNull
-  public static ScheduledExecutorService createBoundedScheduledExecutorService(int maxSimultaneousTasks) {
-    return new BoundedScheduledExecutorService(getAppExecutorService(), maxSimultaneousTasks);
+  public static ScheduledExecutorService createBoundedScheduledExecutorService(@NotNull String name, int maxSimultaneousTasks) {
+    return new BoundedScheduledExecutorService(name, getAppExecutorService(), maxSimultaneousTasks);
   }
 
   /**
@@ -68,7 +68,7 @@ public class AppExecutorUtil {
    * @see #getAppExecutorService()
    */
   @NotNull
-  public static ExecutorService createBoundedApplicationPoolExecutor(int maxThreads) {
-    return new BoundedTaskExecutor(getAppExecutorService(), maxThreads);
+  public static ExecutorService createBoundedApplicationPoolExecutor(@NotNull String name, int maxThreads) {
+    return new BoundedTaskExecutor(name, getAppExecutorService(), maxThreads);
   }
 }
index bf118f4f96200e43df818e5583668c351e25d5d7..42327f470b6348300203c690665c5c0da8ca5c67 100644 (file)
@@ -29,8 +29,8 @@ import java.util.concurrent.TimeUnit;
  * and execute them in parallel in the {@code backendExecutor} with not more than at {@code maxSimultaneousTasks} at a time.
  */
 class BoundedScheduledExecutorService extends SchedulingWrapper {
-  BoundedScheduledExecutorService(@NotNull ExecutorService backendExecutor, int maxSimultaneousTasks) {
-    super(new BoundedTaskExecutor(backendExecutor, maxSimultaneousTasks),
+  BoundedScheduledExecutorService(@NotNull String name, @NotNull ExecutorService backendExecutor, int maxSimultaneousTasks) {
+    super(new BoundedTaskExecutor(name, backendExecutor, maxSimultaneousTasks),
           ((AppScheduledExecutorService)AppExecutorUtil.getAppScheduledExecutorService()).delayQueue);
     assert !(backendExecutor instanceof ScheduledExecutorService) : "backendExecutor is already ScheduledExecutorService: " + backendExecutor;
   }
index 4aea89686291fa930c56c9118409302bc63c2d77..fa8745aaf87a10ae74eb4a0e7de349094ab93250 100644 (file)
@@ -18,6 +18,7 @@ package com.intellij.util.concurrency;
 import com.intellij.Patches;
 import com.intellij.openapi.Disposable;
 import com.intellij.openapi.util.Disposer;
+import com.intellij.util.ExceptionUtil;
 import com.intellij.util.Function;
 import com.intellij.util.ObjectUtils;
 import com.intellij.util.ReflectionUtil;
@@ -37,6 +38,7 @@ import java.util.concurrent.atomic.AtomicReference;
  */
 public class BoundedTaskExecutor extends AbstractExecutorService {
   private volatile boolean myShutdown;
+  @NotNull private final String myName;
   private final Executor myBackendExecutor;
   private final int myMaxTasks;
   // low  32 bits: number of tasks running (or trying to run)
@@ -44,7 +46,8 @@ public class BoundedTaskExecutor extends AbstractExecutorService {
   private final AtomicLong myStatus = new AtomicLong();
   private final BlockingQueue<Runnable> myTaskQueue = new LinkedBlockingQueue<Runnable>();
 
-  public BoundedTaskExecutor(@NotNull Executor backendExecutor, int maxSimultaneousTasks) {
+  public BoundedTaskExecutor(@NotNull String name, @NotNull Executor backendExecutor, int maxSimultaneousTasks) {
+    myName = name;
     myBackendExecutor = backendExecutor;
     if (maxSimultaneousTasks < 1) {
       throw new IllegalArgumentException("maxSimultaneousTasks must be >=1 but got: "+maxSimultaneousTasks);
@@ -55,11 +58,18 @@ public class BoundedTaskExecutor extends AbstractExecutorService {
     myMaxTasks = maxSimultaneousTasks;
   }
 
+  /**
+   * @deprecated use {@link #BoundedTaskExecutor(String, Executor, int)} instead
+   */
+  public BoundedTaskExecutor(@NotNull Executor backendExecutor, int maxSimultaneousTasks) {
+    this(ExceptionUtil.getThrowableText(new Throwable("Creation point:")), backendExecutor, maxSimultaneousTasks);
+  }
+
   /**
    * Constructor which automatically shuts down this executor when {@code parent} is disposed.
    */
-  public BoundedTaskExecutor(@NotNull Executor backendExecutor, int maxSimultaneousTasks, @NotNull Disposable parent) {
-    this(backendExecutor, maxSimultaneousTasks);
+  public BoundedTaskExecutor(@NotNull String name, @NotNull Executor backendExecutor, int maxSimultaneousTasks, @NotNull Disposable parent) {
+    this(name, backendExecutor, maxSimultaneousTasks);
     Disposer.register(parent, new Disposable() {
       @Override
       public void dispose() {
@@ -84,7 +94,7 @@ public class BoundedTaskExecutor extends AbstractExecutorService {
 
   @Override
   public void shutdown() {
-    if (myShutdown) throw new IllegalStateException("Already shutdown");
+    if (myShutdown) throw new IllegalStateException("Already shutdown: "+this);
     myShutdown = true;
   }
 
@@ -282,11 +292,13 @@ public class BoundedTaskExecutor extends AbstractExecutorService {
   public String toString() {
     return "BoundedExecutor(" + myMaxTasks + ") " + (isShutdown() ? "SHUTDOWN " : "") +
            "inProgress: " + (int)myStatus.get() +
-           "; " + myTaskQueue.size() + " tasks in queue: [" + ContainerUtil.map(myTaskQueue, new Function<Runnable, Object>() {
-      @Override
-      public Object fun(Runnable runnable) {
-        return info(runnable);
-      }
-    }) + "]";
+           "; " +
+           (myTaskQueue.isEmpty() ? "" : "Queue size: "+myTaskQueue.size() +"; tasks in queue: [" + ContainerUtil.map(myTaskQueue, new Function<Runnable, Object>() {
+             @Override
+             public Object fun(Runnable runnable) {
+               return info(runnable);
+             }
+           }) + "]") +
+      "name: "+myName;
   }
 }
index 5eef580f26a6e54e8457eaa90bc58254134fd30c..9c3617dc35fca04d379b7e9e71c46198f9519529 100644 (file)
@@ -22,12 +22,12 @@ import java.util.concurrent.Executor;
 import java.util.concurrent.ExecutorService;
 
 public class SequentialTaskExecutor extends BoundedTaskExecutor {
-  public SequentialTaskExecutor(@NotNull Executor executor) {
-    super(executor, 1);
+  public SequentialTaskExecutor(@NotNull String name, @NotNull Executor executor) {
+    super(name, executor, 1);
   }
 
   @NotNull
-  public static ExecutorService createSequentialApplicationPoolExecutor() {
-    return AppExecutorUtil.createBoundedApplicationPoolExecutor(1);
+  public static ExecutorService createSequentialApplicationPoolExecutor(@NotNull String name) {
+    return AppExecutorUtil.createBoundedApplicationPoolExecutor(name, 1);
   }
 }
index d2766f537064e80bbc10124e278a855de8917826..2f300a5dd6cecaffdaba56d051aea4981ee253b9 100644 (file)
@@ -78,7 +78,7 @@ public class ChangeListManagerImpl extends ChangeListManagerEx implements Projec
   private final UpdateRequestsQueue myUpdater;
 
   private static final AtomicReference<Future> ourUpdateAlarm = new AtomicReference<>();
-  private final ScheduledExecutorService myScheduledExecutorService = AppExecutorUtil.createBoundedScheduledExecutorService(1);
+  private final ScheduledExecutorService myScheduledExecutorService = AppExecutorUtil.createBoundedScheduledExecutorService("ChangeListManagerImpl pool",1);
 
   private final Modifier myModifier;
 
index aa0f3999aa890041293dd197e3b4807311154a50..afc0f06ebb69f1261ab6aff0d410e9b64015a39d 100644 (file)
@@ -43,7 +43,7 @@ public class Extractor implements Disposable {
   private final SegmentedInputStream myStream;
   private OutputPacketProcessor myEventsDispatcher;
   private static final Logger LOG = Logger.getInstance("#" + Extractor.class.getName());
-  private final ExecutorService myExecutor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor();
+  private final ExecutorService myExecutor = SequentialTaskExecutor.createSequentialApplicationPoolExecutor("Ant Extractor pool");
   private final BlockingQueue<Runnable> myTaskQueue = new LinkedBlockingQueue<>();
 
   public Extractor(@NotNull InputStream stream, @NotNull Charset charset) {
index 8eacf9a6225aa0390ffdecbf34ad5153dc7fa984..c8e4b13878ba26c8e2c35f6351874f435ead2892 100644 (file)
@@ -80,7 +80,7 @@ public class GroovyDslFileIndex extends ScalarIndexExtension<String> {
   private static final MultiMap<String, LinkedBlockingQueue<Pair<VirtualFile, GroovyDslExecutor>>> filesInProcessing =
     new ConcurrentMultiMap<>();
 
-  private static final ExecutorService ourPool = AppExecutorUtil.createBoundedApplicationPoolExecutor(4);
+  private static final ExecutorService ourPool = AppExecutorUtil.createBoundedApplicationPoolExecutor("GroovyDSLIndex pool",4);
 
   private final MyDataIndexer myDataIndexer = new MyDataIndexer();
 
index 75b7318f259f7caf33fd25b8d159fd1e25fa0963..ae7c4a0373c8239d49f8eae08824c603cd6605a7 100644 (file)
@@ -61,7 +61,7 @@ import java.util.concurrent.ExecutorService;
  * @author peter
  */
 public class MvcModuleStructureSynchronizer extends AbstractProjectComponent {
-  private static final ExecutorService ourExecutor = AppExecutorUtil.createBoundedApplicationPoolExecutor(1);
+  private static final ExecutorService ourExecutor = AppExecutorUtil.createBoundedApplicationPoolExecutor("MvcModuleStructureSynchronizer pool",1);
   private final Set<Pair<Object, SyncAction>> myOrders = new LinkedHashSet<>();
 
   private Set<VirtualFile> myPluginRoots = Collections.emptySet();