修改线程池线程前缀名称.

pull/84/head
chen.ma 3 years ago
parent dd34a01b51
commit 828413eb9b

@ -26,6 +26,7 @@ public class CommonConfig {
@Primary
public ThreadPoolTaskExecutor monitorThreadPoolTaskExecutor() {
ThreadPoolTaskExecutor monitorThreadPool = new ThreadPoolTaskExecutor();
monitorThreadPool.setThreadNamePrefix("server.monitor.executor.");
monitorThreadPool.setCorePoolSize(AVAILABLE_PROCESSORS);
monitorThreadPool.setMaxPoolSize(AVAILABLE_PROCESSORS << 1);
monitorThreadPool.setQueueCapacity(4096);

@ -17,7 +17,7 @@ import static cn.hippo4j.common.constant.Constants.DEFAULT_GROUP;
public class ConfigExecutor {
private static final ScheduledExecutorService LONG_POLLING_EXECUTOR = ExecutorFactory.Managed
.newSingleScheduledExecutorService(DEFAULT_GROUP, r -> new Thread(r, "long-polling"));
.newSingleScheduledExecutorService(DEFAULT_GROUP, r -> new Thread(r, "server.long.polling"));
public static void executeLongPolling(Runnable runnable) {
LONG_POLLING_EXECUTOR.execute(runnable);

Loading…
Cancel
Save