Merge "Always use a thread pool for interactive indexing"

This commit is contained in:
David Pursehouse
2016-05-10 04:47:15 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -140,7 +140,7 @@ public class IndexModule extends LifecycleModule {
threads = config.getInt("index", null, "threads", 0);
}
if (threads <= 0) {
return MoreExecutors.newDirectExecutorService();
threads = Runtime.getRuntime().availableProcessors() / 2 + 1;
}
return MoreExecutors.listeningDecorator(
workQueue.createQueue(threads, "Index-Interactive"));