You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "viktorsomogyi (via GitHub)" <gi...@apache.org> on 2023/04/14 12:54:30 UTC

[GitHub] [kafka] viktorsomogyi commented on a diff in pull request #13557: KAFKA-14902: KafkaStatusBackingStore retries on a dedicated backgroun…

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

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