viktorsomogyi commented on code in PR #13557:
URL: https://github.com/apache/kafka/pull/13557#discussion_r1166798950


##########
clients/src/main/java/org/apache/kafka/common/utils/ThreadUtils.java:
##########
@@ -52,4 +55,26 @@ public Thread newThread(Runnable r) {
             }
         };
     }
+
+    /**
+     * Shuts down an executor service with a timeout. After the timeout/on 
interrupt, the service is forcefully closed.
+     * @param executorService The service to shut down.
+     * @param timeout The timeout of the shutdown.
+     * @param timeUnit The time unit of the shutdown timeout.
+     * @return True, if the shutdown was clean.
+     */
+    public static boolean shutdownExecutorServiceSilently(ExecutorService 
executorService,

Review Comment:
   Since the return value is never used and similar methods (like 
org.apache.kafka.common.utils.Utils#closeQuietly) are void, we can make this 
void too.
   
   nit: please rename it to shutdownExecutorServiceQuietly to keep a similar 
naming to others.



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to