mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup: avoid creating Future unnecessarily
This commit is contained in:
@@ -31,7 +31,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.ide.PooledThreadExecutor;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
* @author max
|
||||
@@ -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 = AppExecutorUtil.createBoundedApplicationPoolExecutor("RefreshQueue Pool", PooledThreadExecutor.INSTANCE, 1, this);
|
||||
private final Executor myQueue = AppExecutorUtil.createBoundedApplicationPoolExecutor("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);
|
||||
@@ -68,7 +68,7 @@ public class RefreshQueueImpl extends RefreshQueue implements Disposable {
|
||||
}
|
||||
|
||||
private void queueSession(@NotNull RefreshSessionImpl session, @Nullable TransactionId transaction) {
|
||||
myQueue.submit(() -> {
|
||||
myQueue.execute(() -> {
|
||||
myRefreshIndicator.start();
|
||||
try (AccessToken ignored = HeavyProcessLatch.INSTANCE.processStarted("Doing file refresh. " + session)) {
|
||||
doScan(session);
|
||||
|
||||
Reference in New Issue
Block a user