tkalkirill commented on code in PR #2453:
URL: https://github.com/apache/ignite-3/pull/2453#discussion_r1296821198


##########
modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java:
##########
@@ -913,6 +914,29 @@ public static void inBusyLock(IgniteSpinBusyLock busyLock, 
Runnable fn) {
         }
     }
 
+    /**
+     * Method that runs the provided {@code fn} in {@code busyLock}.
+     *
+     * @param <T> Type of returned value from {@code fn}.
+     * @param busyLock Component's busy lock.
+     * @param fn Function to run.
+     * @return Future returned from the {@code fn}, or future with the {@link 
NodeStoppingException} if
+     *      {@link IgniteSpinBusyLock#enterBusy()} failed or with runtime 
exception/error while executing the {@code fn}.
+     */
+    public static <T> CompletableFuture<T> inBusyLockAsync(IgniteSpinBusyLock 
busyLock, Supplier<CompletableFuture<T>> fn) {

Review Comment:
   Thanks for the advice, I'll leave it.



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