Update CompletableFutureUtils.java

This commit is contained in:
Andrea Cavalli 2020-08-28 17:07:35 +02:00
parent 8d32b96dba
commit 99b9139a0b

View File

@ -404,4 +404,10 @@ public class CompletableFutureUtils {
Executor executor) {
return CompletableFuture.completedFuture(null).thenComposeAsync((_x) -> supp.get(), executor);
}
public static <U> CompletableFuture<U> composeAsyncIO(
IOSupplier<CompletableFuture<U>> supp,
Executor executor) {
return CompletableFuture.completedFuture(null).thenComposeAsync((_x) -> getCompletableFutureIO(supp), executor);
}
}