线程池命名错误

This commit is contained in:
三丙
2024-10-14 17:30:31 +08:00
parent 93d8ec9b6e
commit 86614a5a92

View File

@@ -79,7 +79,7 @@ public class ShardingThreadPool {
int partition = hash(hashFunction, hashKey);
EXECUTOR_SERVICE_MAP.computeIfAbsent(partition % parallelism,
p -> Executors.newFixedThreadPool(1, JCPPThreadFactory.forName("sharding-threads" + p)))
p -> Executors.newFixedThreadPool(1, JCPPThreadFactory.forName("sharding-threads-%d" + p)))
.execute(runnable);
}
}