HUSTERGS commented on PR #14524:
URL: https://github.com/apache/lucene/pull/14524#issuecomment-2923052803

   > @javanna Hey! I kinda disagree with: `general idea was to make concurrency 
as transparent as possible` since the caller thread is used alongside another 
exec service. I think trading off slightly better perf in exchange for less 
transparency from the user pov isn't correct. In the prev case, it was very 
easy to see how resources were used and control that.
   > 
   > > Is there a way to implement the grouping of fairness you have in mind on 
top of the current TaskExecutor?
   > 
   > Not that I am aware of, which is why I suggested to make the task executor 
pluggable.
   
   
   @Shibi-bala I'm wondering whether it is what you want if you put your 
`searcher.search()` itself directly into the same Executor, and wait for it to 
complete (although I do admit this might not be best way to achieve your goal):
   ```java
   ExecutorService executor = Executors.newFixedThreadPool(4);
   IndexSeacher searcher = new IndexSearcher(indexReader, executor);
   executor.submit(() -> searcher.search()).get();
   ```
   Please let me know if I got anything wrong
   


-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to