Doc: ThreadPoolTaskExecutor's defaults vs setting queueCapacity for common pool scenarios [SPR-16944] #21483
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: task
A general task
Milestone
Constantino Cronemberger opened SPR-16944 and commented
According to ThreadPoolExecutor Javadoc:
"If there are more than corePoolSize but less than maximumPoolSize threads running, a new thread will be created only if the queue is full."
In the class ThreadPoolTaskExecutor the default values are: 1 for the corePoolSize and Integer.MAX_VALUE for maxPoolSize and queueCapacity.
This means that a second thread will be created only when we have MAX_VALUE elements in the queue. This is is not reasonable.
I think queueCapacity should not have a default value.
Issue Links:
Backported to: 4.3.19
The text was updated successfully, but these errors were encountered: