lukecwik commented on PR #23234:
URL: https://github.com/apache/beam/pull/23234#issuecomment-1270525462

   > It looks like setting core pool size to int.max and allowing core thread 
timeout is working it is recommended to not do that, but the concern of running 
out of threads doesn't appear to be valid.
   
   This does not do what you want since a `corePoolSize == Integer.MAX` will 
mean that we will want to start a new thread before checking to see if there is 
already an idle thread capable of doing the work. This leads to every task 
running on a new thread and then expiring after the timeout (which is very 
expensive performance wise). This is why the previous thread pool had a core 
pool size of 0. This forced the thread pool to first offer it to the queue and 
then start a new worker if all the workers are busy.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to