aboutsummaryrefslogtreecommitdiffstats
path: root/container-core
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2020-06-03 16:04:39 +0200
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2020-06-03 17:10:39 +0200
commita9a3cadedbf5c5270fcf8541eb37e8ef69ea57f0 (patch)
treebc050f2b1377bbbd79cba4dc1a0ac85f4971a22f /container-core
parent3044bb2786df4522b7734150c430585bb7221a64 (diff)
Add config for thread pool name
Diffstat (limited to 'container-core')
-rw-r--r--container-core/src/main/java/com/yahoo/container/handler/threadpool/ContainerThreadPool.java2
-rw-r--r--container-core/src/main/resources/configdefinitions/threadpool.def3
2 files changed, 4 insertions, 1 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/handler/threadpool/ContainerThreadPool.java b/container-core/src/main/java/com/yahoo/container/handler/threadpool/ContainerThreadPool.java
index 0f3be65f85f..45b55a8a150 100644
--- a/container-core/src/main/java/com/yahoo/container/handler/threadpool/ContainerThreadPool.java
+++ b/container-core/src/main/java/com/yahoo/container/handler/threadpool/ContainerThreadPool.java
@@ -37,7 +37,7 @@ public class ContainerThreadPool extends AbstractComponent implements AutoClosea
new WorkerCompletionTimingThreadPoolExecutor(maxNumThreads, maxNumThreads,
0L, TimeUnit.SECONDS,
createQ(threadpoolConfig.queueSize(), maxNumThreads),
- ThreadFactoryFactory.getThreadFactory("threadpool"),
+ ThreadFactoryFactory.getThreadFactory(threadpoolConfig.name()),
metric);
// Prestart needed, if not all threads will be created by the fist N tasks and hence they might also
// get the dreaded thread locals initialized even if they will never run.
diff --git a/container-core/src/main/resources/configdefinitions/threadpool.def b/container-core/src/main/resources/configdefinitions/threadpool.def
index 81e77c51194..b3202ebfecc 100644
--- a/container-core/src/main/resources/configdefinitions/threadpool.def
+++ b/container-core/src/main/resources/configdefinitions/threadpool.def
@@ -16,3 +16,6 @@ queueSize int default=0
# get out of a bad state. This should be set a bit higher than the expected max execution
# time of each request when in a state of overload, i.e about "worst case execution time*2"
maxThreadExecutionTimeSeconds int default=190
+
+# Prefix for the name of the threads
+name string default="default-pool" \ No newline at end of file