Core pool size vs maximum pool size in ThreadPoolExecutor

From this blog post:

Take this example. Starting thread pool size is 1, core pool size is
5, max pool size is 10 and the queue is 100.

As requests come in,
threads will be created up to 5 and then tasks will be added to the
queue until it reaches 100. When the queue is full new threads will be
created up to maxPoolSize. Once all the threads are in use and the
queue is full tasks will be rejected. As the queue reduces, so does
the number of active threads.

Leave a Comment