lhotari commented on code in PR #19258:
URL: https://github.com/apache/pulsar/pull/19258#discussion_r1072491819


##########
pulsar-common/src/main/java/org/apache/pulsar/common/util/FutureUtil.java:
##########
@@ -258,4 +259,25 @@ public static CompletionException 
wrapToCompletionException(Throwable throwable)
             return new CompletionException(throwable);
         }
     }
+
+    /**
+     * Executes an operation using the supplied {@link Executor}
+     * and notify failures on the supplied {@link CompletableFuture}.
+     *
+     * @param runnable the runnable to execute
+     * @param executor  the executor to use for executing the runnable
+     * @param completableFuture  the future to complete in case of exceptions
+     * @return
+     */
+
+    public static void safeRunAsync(Runnable runnable,

Review Comment:
   It could improve readability of the code using this if the Runnable is the 
last argument. However, I don't have a strong opinion about 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to