From 24346a30a25db2647a1f5e5928db93c80566bbca Mon Sep 17 00:00:00 2001 From: xuxueli <931591021@qq.com> Date: Mon, 18 Feb 2019 10:05:10 +0800 Subject: [PATCH] thread pool name optimize --- .../xxl/job/admin/core/thread/JobTriggerPoolHelper.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobTriggerPoolHelper.java b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobTriggerPoolHelper.java index ea81de0e..66ee749b 100644 --- a/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobTriggerPoolHelper.java +++ b/xxl-job-admin/src/main/java/com/xxl/job/admin/core/thread/JobTriggerPoolHelper.java @@ -6,6 +6,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; @@ -25,7 +26,13 @@ public class JobTriggerPoolHelper { 256, 60L, TimeUnit.SECONDS, - new LinkedBlockingQueue(1000)); + new LinkedBlockingQueue(1000), + new ThreadFactory() { + @Override + public Thread newThread(Runnable r) { + return new Thread(r, "xxl-job, admin JobTriggerPoolHelper-triggerPool" + r.hashCode()); + } + }); public void addTrigger(final int jobId, final TriggerTypeEnum triggerType, final int failRetryCount, final String executorShardingParam, final String executorParam) {