Commit 370e0efd authored by jianhua.zhang's avatar jianhua.zhang

调整线程池数量

parent 5b00ca90
......@@ -27,7 +27,7 @@ public class Executor {
public Executor(final String name) {
this.name = name;
this.pool = new ThreadPoolExecutor(SIZE, SIZE * 3, 0L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
this.pool = new ThreadPoolExecutor(SIZE, SIZE * 3, 10L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
new ExecutorThreadFactory());
log.info("初始化线程池 name:{} coreSize:{} maxSize:{}", name, SIZE, SIZE * 3);
}
......
......@@ -26,7 +26,7 @@ public class PersistThreadPool {
public PersistThreadPool() {
for (int i = 0; i < POLL_SIZE; i++) {
executors.add(new ThreadPoolExecutor(POLL_SIZE, POLL_SIZE * 2, 0, TimeUnit.SECONDS,
executors.add(new ThreadPoolExecutor(POLL_SIZE, POLL_SIZE * 2, 10L, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(), new PersistThreadFactory(i)));
}
log.info("初始化线程池 name:{} coreSize:{} maxSize:{}", "PersistThreadPool", POLL_SIZE, POLL_SIZE * 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment