|
@@ -182,8 +182,7 @@ public class CoreServiceImpl implements CoreService {
|
|
|
// 定义一个线程池,设置消费线程的数量
|
|
|
private static final ThreadPoolExecutor matchPoolExecutor = (ThreadPoolExecutor) Executors.newFixedThreadPool(size);
|
|
|
|
|
|
- private static final int size1 = 20;
|
|
|
- private static final ThreadPoolExecutor corePoolExecutor = (ThreadPoolExecutor) Executors.newFixedThreadPool(size1);
|
|
|
+ private static final ThreadPoolExecutor corePoolExecutor = (ThreadPoolExecutor) Executors.newFixedThreadPool(10);
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -412,6 +411,7 @@ public class CoreServiceImpl implements CoreService {
|
|
|
|
|
|
if (corePoolExecutor.getCorePoolSize() - corePoolExecutor.getActiveCount() > 0) {
|
|
|
int threadSize = corePoolExecutor.getCorePoolSize() - corePoolExecutor.getActiveCount();
|
|
|
+ log.info("threadNum={}", threadSize);
|
|
|
CountDownLatch latch = new CountDownLatch(threadSize);
|
|
|
// 启动消费者线程
|
|
|
for (int i = 0; i < threadSize; i++) {
|