|
@@ -172,11 +172,11 @@ public class ThreadProcessUtils implements ApplicationContextAware, Initializing
|
|
|
this.threadProperties = this.applicationContext.getBean(ThreadProperties.class);
|
|
|
if (this.threadProperties != null && this.threadProperties.getThreadPool() != null) {
|
|
|
ThreadPoolProperties threadPool = this.threadProperties.getThreadPool();
|
|
|
- ExecutorService executorService = new ThreadPoolExecutor(threadPool.getCorePoolSize(), threadPool.getMaximumPoolSize(), threadPool.getKeepAliveTime(), TimeUnit.SECONDS, new ArrayBlockingQueue(100));
|
|
|
+ ExecutorService executorService = new ThreadPoolExecutor(threadPool.getCorePoolSize(), threadPool.getMaximumPoolSize(), threadPool.getKeepAliveTime(), TimeUnit.SECONDS, new ArrayBlockingQueue(threadPool.getQueueSize()));
|
|
|
setExecutorService(executorService);
|
|
|
} else {
|
|
|
ThreadPoolProperties threadPool = new ThreadPoolProperties();
|
|
|
- ExecutorService executorService = new ThreadPoolExecutor(threadPool.getCorePoolSize(), threadPool.getMaximumPoolSize(), threadPool.getKeepAliveTime(), TimeUnit.SECONDS, new ArrayBlockingQueue(100));
|
|
|
+ ExecutorService executorService = new ThreadPoolExecutor(threadPool.getCorePoolSize(), threadPool.getMaximumPoolSize(), threadPool.getKeepAliveTime(), TimeUnit.SECONDS, new ArrayBlockingQueue(threadPool.getQueueSize()));
|
|
|
setExecutorService(executorService);
|
|
|
}
|
|
|
}
|