diff options
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/searchchain/ExecutionFactory.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/searchchain/ExecutionFactory.java | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/searchchain/ExecutionFactory.java b/container-search/src/main/java/com/yahoo/search/searchchain/ExecutionFactory.java index 87880ce2445..dc044c77c94 100644 --- a/container-search/src/main/java/com/yahoo/search/searchchain/ExecutionFactory.java +++ b/container-search/src/main/java/com/yahoo/search/searchchain/ExecutionFactory.java @@ -86,7 +86,7 @@ public class ExecutionFactory extends AbstractComponent { this.schemaInfo = schemaInfo; this.specialTokens = new SpecialTokenRegistry(specialTokens); this.linguistics = linguistics; - this.renderingExecutor = createRenderingExecutor(); + this.renderingExecutor = new RenderingExecutorFactory().createExecutor(); this.rendererRegistry = new RendererRegistry(renderers.allComponents(), renderingExecutor); this.executor = executor != null ? executor : Executors.newSingleThreadExecutor(); } @@ -151,13 +151,4 @@ public class ExecutionFactory extends AbstractComponent { null); } - private static ThreadPoolExecutor createRenderingExecutor() { - int threadCount = Runtime.getRuntime().availableProcessors(); - ThreadPoolExecutor executor = new ThreadPoolExecutor(threadCount, threadCount, 1L, TimeUnit.SECONDS, - new LinkedBlockingQueue<>(), - ThreadFactoryFactory.getThreadFactory("common-rendering")); - executor.prestartAllCoreThreads(); - return executor; - } - } |