Behavior of ThreadPoolTaskExecutor
Note that I always forget the behavior of ThreadPoolTaskExecutor (ThreadPoolExecutor).
- Up to corePoolSize, create threads and assign tasks.
- If corePoolSize is exceeded, queueCapacity will be added to the queue.
- When queueCapacity is exceeded, threads are added up to maxPoolSize and tasks are assigned.
- TaskRejectedException when queueCapacity + maxPoolSize is exceeded.
- Idle threads that exceed corePoolSize will be shut down after keepAliveSeconds.