danielcweeks commented on code in PR #11073:
URL: https://github.com/apache/iceberg/pull/11073#discussion_r1761979260
##########
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:
Rather than introduce a boolean flag, which is hard to interpret. I would
suggest switch to use using two separate methods: `newWorkerPool`,
`newExitingWorkerPool` (or something to that effect).
The `newExitingWorkerPool` can just wrap the `newWorkerPool` method and
return the exiting version.
Alternatively, we could invert this and add a `newNonExitingWorkerPool`
since we want the default behavior to be exiting.
--
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]