chatman commented on PR #2248:
URL: https://github.com/apache/solr/pull/2248#issuecomment-2096670563

   bq. I think that's an anti-pattern or broken and isn't what I meant in JIRA. 
We could use a SynchronousQueue (with fairness) if we want to block for a 
thread -- probably what we should do. FYI that queue is the default for 
Executors.newCachedThreadPool(). The "caller runs" behavior I meant could be 
done via an ExecutorService delegate that catches RejectedException and simply 
runs the Runnable.
   
   @dsmiley instead of using a rejected tasks execution handler, I went with 
@noblepaul 's suggestion of having a reasonably large queue for the threadpool 
(number of threads * 1000). Beyond this, if tasks are submitted, it is okay to 
reject them. We can revisit these limits later as well.


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