I have to send out massEmails to all users of a website. I want to use a thread pool for each email that is sent out. Currently I have set the values to :
&l
In addition to what @skaffman pointed out from official docs, following also makes it more clear how these sizes are utilized:
Any BlockingQueue
may be used to transfer and hold submitted tasks. The use of this queue interacts with pool sizing:
corePoolSize
threads are running, the Executor
always prefers adding a new thread rather than queuing.corePoolSize
or more threads are running, the Executor
always prefers queuing a request rather than adding a new thread.maximumPoolSize
, in which case, the task will be rejected.