UnindexedFilesUpdater: rename "getIndexingThreadsNumber" to more grammatical "getNumberOfIndexingThreads".

GitOrigin-RevId: 743168569440d76f36a9b5efccf0b048bfbcf565
This commit is contained in:
Sergey Patrikeev
2020-02-27 13:26:27 +03:00
committed by intellij-monorepo-bot
parent e8006b21f0
commit 3220b38ae3
4 changed files with 4 additions and 4 deletions

View File

@@ -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(() -> {

View File

@@ -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(() -> {

View File

@@ -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));

View File

@@ -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;