keith-turner commented on code in PR #2752:
URL: https://github.com/apache/accumulo/pull/2752#discussion_r900431317


##########
core/src/main/java/org/apache/accumulo/core/util/CompletableFutureUtil.java:
##########
@@ -49,4 +51,26 @@ public static <T> CompletableFuture<T> 
merge(List<CompletableFuture<T>> futures,
     return futures.get(0);
   }
 
+  /**
+   * Iterate some function until a given condition is met.
+   *
+   * The step function should always return an asynchronous {@code
+   * CompletableFuture} in order to avoid stack overflows.
+   */
+  public static <T> CompletableFuture<T> 
iterateUntil(Function<T,CompletableFuture<T>> step,

Review Comment:
   The test added in 252a067 looks good.



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