Browse Source

调整自定义线程池大小

codingliang 1 year atrás
parent
commit
5ef7fe5945
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/java/com/sqx/common/utils/MyGlobalThreadPool.java

+ 1 - 1
src/main/java/com/sqx/common/utils/MyGlobalThreadPool.java

@@ -29,7 +29,7 @@ public class MyGlobalThreadPool {
 		if (null != executor) {
 			executor.shutdownNow();
 		}
-		executor = new ThreadPoolExecutor(2, 10, 60L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>());
+		executor = new ThreadPoolExecutor(10, 20, 60L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>());
 	}
 
 	/**