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


##########
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:
   I like this order because it's the same of 
`CompletableFuture#runAsync(Runnable runnable, Executor executor)`



-- 
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