From 727996d0b78f367663ec27960dd2ff7378f8126b Mon Sep 17 00:00:00 2001 From: Jerry Lee Date: Sat, 18 May 2024 22:58:21 +0800 Subject: [PATCH] WIP --- .../main/java/io/foldright/cffu/CompletableFutureUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cffu-core/src/main/java/io/foldright/cffu/CompletableFutureUtils.java b/cffu-core/src/main/java/io/foldright/cffu/CompletableFutureUtils.java index 39514855..52a3afd9 100644 --- a/cffu-core/src/main/java/io/foldright/cffu/CompletableFutureUtils.java +++ b/cffu-core/src/main/java/io/foldright/cffu/CompletableFutureUtils.java @@ -210,14 +210,14 @@ public static CompletableFuture> mostResultsOfSuccess( // defensive copy input cf in order to // avoid writing it by `completeOnTimeout` and read its results(`getSuccessNow`) final CompletableFuture f = toCfCopy(cfs[0]); - return orTimeout(f, timeout, unit) + return orTimeout(f, timeout, unit, AsyncPoolHolder.ASYNC_POOL) .handle((unused, ex) -> arrayList(getSuccessNow(f, valueIfNotSuccess))); } // MUST be *Non-Minimal* CF instances in order to read results(`getSuccessNow`), // otherwise UnsupportedOperationException final CompletableFuture[] cfArray = f_toNonMinCfArray(cfs); - return orTimeout(CompletableFuture.allOf(cfArray), timeout, unit) + return orTimeout(CompletableFuture.allOf(cfArray), timeout, unit, AsyncPoolHolder.ASYNC_POOL) .handle((unused, ex) -> arrayList(MGetSuccessNow0(valueIfNotSuccess, cfArray))); } @@ -675,7 +675,7 @@ private static CompletableFuture mostTupleOfSuccess0( // MUST be *Non-Minimal* CF instances in order to read results(`getSuccessNow`), // otherwise UnsupportedOperationException final CompletableFuture[] cfArray = f_toNonMinCfArray(css); - return orTimeout(CompletableFuture.allOf(cfArray), timeout, unit) + return orTimeout(CompletableFuture.allOf(cfArray), timeout, unit, AsyncPoolHolder.ASYNC_POOL) .handle((unused, ex) -> tupleOf0(MGetSuccessNow0(null, cfArray))); }