dsmiley commented on PR #2619:
URL: https://github.com/apache/solr/pull/2619#issuecomment-2273984102

   After reading ThreadPoolExecutor's docs a bit more, I was surprised to see 
that a new thread will be created for a new task when the thread count is less 
than the core size _even if there are threads idle_.  I checked out this PR and 
did a trivial experiment where I executed two tasks in series (one completing 
before the other), even with a sleep in-between, and both reported different 
threads.  That's sad and makes no sense to me why it would be designed that way 
(or maybe it's more like a documented deficiency?).  Any way, It's not that 
important; not too many idle threads.  I suppose if the idle time were really 
short (a second?) then there would be no wasted idle threads as they would 
barely exist.  But it would mean more thread creation over time and I'm not 
sure what to think of that.
   
   Any way, I think this is a nice change.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to