what is the maximum corepoolsize,maxpoolsize ,queuecapacity can we allocate in java spring boot framework.i am working n corporate which in need to handle more thread requests. i have to increase thread performance.The existing one is with default values.
public Executor asyncExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(corePoolSize);
executor.setMaxPoolSize(maxPoolSize);
executor.setQueueCapacity(queueCapacity);
return executor;
}
核心池大小默认配置为1,最大池大小和队列容量为2147483647。
according to the documents:
If running threads are more than corePoolSize but less than maximumPoolSize, a new thread will be created only if the queue is full
.
take a look at this issue and I think you can find a proper answer here!
[https://stackoverflow.com/questions/17659510/core-pool-size-vs-maximum-pool-size-in-threadpoolexecutor][1]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.