mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
minor ProcessIOExecutorService fixes (IDEA-CR-9926)
This commit is contained in:
@@ -19,14 +19,8 @@ public class ProcessIOExecutorService extends ThreadPoolExecutor {
|
||||
public static final String POOLED_THREAD_PREFIX = "Process I/O pool ";
|
||||
public static final ProcessIOExecutorService INSTANCE = new ProcessIOExecutorService();
|
||||
|
||||
/**
|
||||
* 3 for each process: ProcessWaitFor + 2 x BaseDataReader (stdout and stderr)
|
||||
* Allow for at least 2 processes: fsnotifier and external build/VCS/run configuration
|
||||
*/
|
||||
private static final int CORE_POOL_SIZE = 3 * 3;
|
||||
|
||||
private ProcessIOExecutorService() {
|
||||
super(CORE_POOL_SIZE, Integer.MAX_VALUE, 1, TimeUnit.MINUTES, new SynchronousQueue<Runnable>(), new ThreadFactory() {
|
||||
super(1, Integer.MAX_VALUE, 1, TimeUnit.MINUTES, new SynchronousQueue<Runnable>(), new ThreadFactory() {
|
||||
private final AtomicInteger counter = new AtomicInteger();
|
||||
@NotNull
|
||||
@Override
|
||||
|
||||
@@ -41,7 +41,7 @@ public class ProcessWaitFor {
|
||||
public void run() {
|
||||
String oldThreadName = Thread.currentThread().getName();
|
||||
if (!StringUtil.isEmptyOrSpaces(presentableName)) {
|
||||
Thread.currentThread().setName(oldThreadName + ": " + StringUtil.first("ProcessWaitFor: " + presentableName, 120, true));
|
||||
Thread.currentThread().setName(StringUtil.first("ProcessWaitFor: " + presentableName, 120, true));
|
||||
}
|
||||
int exitCode = 0;
|
||||
try {
|
||||
|
||||
@@ -55,7 +55,7 @@ public abstract class BaseDataReader {
|
||||
public void run() {
|
||||
String oldThreadName = Thread.currentThread().getName();
|
||||
if (!StringUtil.isEmptyOrSpaces(presentableName)) {
|
||||
Thread.currentThread().setName(oldThreadName + ": " + StringUtil.first("BaseDataReader: " + presentableName, 120, true));
|
||||
Thread.currentThread().setName(StringUtil.first("BaseDataReader: " + presentableName, 120, true));
|
||||
}
|
||||
try {
|
||||
doRun();
|
||||
|
||||
Reference in New Issue
Block a user