mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't report leaked threads from process pool
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.testFramework;
|
||||
|
||||
import com.intellij.execution.process.ProcessIOExecutorService;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.project.ProjectManager;
|
||||
@@ -92,7 +93,10 @@ public class ThreadTracker {
|
||||
wellKnownOffenders.add("VM Thread");
|
||||
wellKnownOffenders.add("YJPAgent-Telemetry");
|
||||
|
||||
longRunningThreadCreated(ApplicationManager.getApplication(), "Periodic tasks thread", "ApplicationImpl pooled thread");
|
||||
longRunningThreadCreated(ApplicationManager.getApplication(),
|
||||
"Periodic tasks thread",
|
||||
"ApplicationImpl pooled thread ",
|
||||
ProcessIOExecutorService.POOLED_THREAD_PREFIX);
|
||||
}
|
||||
|
||||
// marks Thread with this name as long-running, which should be ignored from the thread-leaking checks
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
* @author peter
|
||||
*/
|
||||
public class ProcessIOExecutorService extends ThreadPoolExecutor {
|
||||
public static final String POOLED_THREAD_PREFIX = "Process I/O pool ";
|
||||
public static final ProcessIOExecutorService INSTANCE = new ProcessIOExecutorService();
|
||||
|
||||
/**
|
||||
@@ -30,7 +31,7 @@ public class ProcessIOExecutorService extends ThreadPoolExecutor {
|
||||
@NotNull
|
||||
@Override
|
||||
public Thread newThread(@NotNull final Runnable r) {
|
||||
Thread thread = new Thread(r, "Process I/O pool " + counter.incrementAndGet());
|
||||
Thread thread = new Thread(r, POOLED_THREAD_PREFIX + counter.incrementAndGet());
|
||||
thread.setPriority(Thread.NORM_PRIORITY - 1);
|
||||
return thread;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user