stevenzwu commented on code in PR #11073:
URL: https://github.com/apache/iceberg/pull/11073#discussion_r1763520712


##########
core/src/main/java/org/apache/iceberg/util/ThreadPools.java:
##########
@@ -86,9 +86,18 @@ public static ExecutorService newWorkerPool(String 
namePrefix) {
   }
 
   public static ExecutorService newWorkerPool(String namePrefix, int poolSize) 
{
-    return MoreExecutors.getExitingExecutorService(
-        (ThreadPoolExecutor)
-            Executors.newFixedThreadPool(poolSize, 
newDaemonThreadFactory(namePrefix)));
+    return newWorkerPool(namePrefix, poolSize, true);
+  }
+
+  public static ExecutorService newWorkerPool(

Review Comment:
   I agree with Dan's suggestion on adding a `newNonExitingWorkerPool` method 
that leaves the shutdown of the thread pool to users. Change some callers to 
this new API.
   
   We don't change the behavior of current `newWorkerPool` which would continue 
to register shutdown hook.
   
   We add clear Javadoc to explain the difference.



-- 
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...@iceberg.apache.org

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


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

Reply via email to