设置默认线程池线程的大小默认为CPU数量+1

This commit is contained in:
wangkang
2018-04-10 09:39:46 +08:00
parent f044d6a2bb
commit 699fa889ef
@@ -62,9 +62,9 @@ public class ApplicationConfig {
public static class ThreadPoolProperties {
/**
* 描述 : 默认线程池大小(默认:1)
* 描述 : 默认线程池大小(默认:CPU数量+1)
*/
private Integer poolSize = 1;
private Integer poolSize = Runtime.getRuntime().availableProcessors() + 1;
/**
* 描述 : 线程优先级