mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
UnindexedFilesUpdater: rename "getIndexingThreadsNumber" to more grammatical "getNumberOfIndexingThreads".
GitOrigin-RevId: 743168569440d76f36a9b5efccf0b048bfbcf565
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e8006b21f0
commit
3220b38ae3
@@ -495,7 +495,7 @@ public final class RefResolveServiceImpl extends RefResolveService implements Ru
|
||||
// fine but grabs all CPUs
|
||||
//return JobLauncher.getInstance().invokeConcurrentlyUnderProgress(fileList, indicator, false, false, processor);
|
||||
|
||||
int parallelism = UnindexedFilesUpdater.getIndexingThreadsNumber();
|
||||
int parallelism = UnindexedFilesUpdater.getNumberOfIndexingThreads();
|
||||
final Callable<Boolean> processFileFromSet = () -> {
|
||||
final boolean[] result = {true};
|
||||
ProgressManager.getInstance().executeProcessUnderProgress(() -> {
|
||||
|
||||
@@ -316,7 +316,7 @@ public final class PushedFilePropertiesUpdaterImpl extends PushedFilePropertiesU
|
||||
final ConcurrentLinkedQueue<Runnable> tasksQueue = new ConcurrentLinkedQueue<>(tasks);
|
||||
List<Future<?>> results = new ArrayList<>();
|
||||
if (tasks.size() > 1) {
|
||||
int numThreads = Math.max(Math.min(UnindexedFilesUpdater.getIndexingThreadsNumber() - 1, tasks.size() - 1), 1);
|
||||
int numThreads = Math.max(Math.min(UnindexedFilesUpdater.getNumberOfIndexingThreads() - 1, tasks.size() - 1), 1);
|
||||
|
||||
for (int i = 0; i < numThreads; ++i) {
|
||||
results.add(ApplicationManager.getApplication().executeOnPooledThread(() -> ProgressManager.getInstance().runProcess(() -> {
|
||||
|
||||
@@ -150,7 +150,7 @@ public class IndexInfrastructure {
|
||||
if (ourDoParallelIndicesInitialization) {
|
||||
ExecutorService taskExecutor = AppExecutorUtil.createBoundedApplicationPoolExecutor(
|
||||
"IndexInfrastructure.DataInitialization.RunParallelNestedInitializationTasks", PooledThreadExecutor.INSTANCE,
|
||||
UnindexedFilesUpdater.getIndexingThreadsNumber());
|
||||
UnindexedFilesUpdater.getNumberOfIndexingThreads());
|
||||
|
||||
for (ThrowableRunnable<?> callable : myNestedInitializationTasks) {
|
||||
taskExecutor.execute(() -> executeNestedInitializationTask(callable, proceedLatch));
|
||||
|
||||
@@ -172,7 +172,7 @@ public final class UnindexedFilesUpdater extends DumbModeTask {
|
||||
}
|
||||
}
|
||||
|
||||
public static int getIndexingThreadsNumber() {
|
||||
public static int getNumberOfIndexingThreads() {
|
||||
int threadsCount = Registry.intValue("caches.indexerThreadsCount");
|
||||
if (threadsCount <= 0) {
|
||||
int coresToLeaveForOtherActivity = ApplicationManager.getApplication().isCommandLine() ? 0 : 1;
|
||||
|
||||
Reference in New Issue
Block a user