shubhamvishu commented on code in PR #12569:
URL: https://github.com/apache/lucene/pull/12569#discussion_r1329299492


##########
lucene/core/src/java/org/apache/lucene/search/TaskExecutor.java:
##########
@@ -48,10 +58,17 @@ class TaskExecutor {
    * @return a list containing the results from the tasks execution
    * @param <T> the return type of the task execution
    */
-  final <T> List<T> invokeAll(Collection<RunnableFuture<T>> tasks) throws 
IOException {
-    for (Runnable task : tasks) {
-      executor.execute(task);
+  final <T> List<T> invokeAll(Collection<Task<T>> tasks) throws IOException {

Review Comment:
   Just a thought : To make us of this for concurrent search should we somehow 
ensure the caller always uses `TaskExecutor`'s `invokeAll` instead of directly 
submitting the tasks to `indexSearcher.getExecutor().execute()`. Do we wish to 
enforce that somehow or leave it upto the user to decide how they would like to 
implement? I don't see any other usages of `IndexSearcher#getExecutor` in the 
codebase, though since its a public API I'm not sure if it would be right to 
deprecate this in this case. Appreciate any views on this.



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