调整线程池配置
This commit is contained in:
parent
ba1c0d0b6c
commit
2cdc51d420
|
@ -23,11 +23,11 @@ public class ThreadPoolManager {
|
||||||
synchronized (ThreadPoolManager.class) {
|
synchronized (ThreadPoolManager.class) {
|
||||||
if (executor == null) {
|
if (executor == null) {
|
||||||
executor = new ThreadPoolExecutor(
|
executor = new ThreadPoolExecutor(
|
||||||
10,
|
4,
|
||||||
20,
|
6,
|
||||||
60L,
|
60L,
|
||||||
TimeUnit.SECONDS,
|
TimeUnit.SECONDS,
|
||||||
new LinkedBlockingQueue<>(100),
|
new LinkedBlockingQueue<>(50),
|
||||||
Executors.defaultThreadFactory(),
|
Executors.defaultThreadFactory(),
|
||||||
new ThreadPoolExecutor.AbortPolicy()
|
new ThreadPoolExecutor.AbortPolicy()
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue