作者的理由是否适合使用thenCompose而不是thenComposeAsync

This question is different from this one Difference between Java8 thenCompose and thenComposeAsync because I want to know what is the writer's reason for using thenCompose and not thenComposeAsync.

我正在阅读《现代Java的实际应用》,在第405页上看到了这部分代码:

public static List<String> findPrices(String product) {
    ExecutorService executor = Executors.newFixedThreadPool(10);
    List<Shop> shops = Arrays.asList(new Shop(), new Shop());
    List<CompletableFuture<String>> priceFutures = shops.stream()
            .map(shop -> CompletableFuture.supplyAsync(() -> shop.getPrice(product), executor))
            .map(future -> future.thenApply(Quote::parse))
            .map(future -> future.thenCompose(quote ->
                    CompletableFuture.supplyAsync(() -> Discount.applyDiscount(quote), executor)))
            .collect(toList());
    return priceFutures.stream()
            .map(CompletableFuture::join).collect(toList());
}

Everything is Ok and I can understand this code but here is the writer's reason for why he didn't use thenComposeAsync on page 408 which I can't understand:

通常,执行名称中没有Async后缀的方法 它的任务与前一个任务在同一线程中,而一个方法 以Async终止总是将后续任务提交给 线程池,因此每个任务都可以由一个 不同的线程。在这种情况下,第二次的结果 CompletableFuture取决于第一个,因此对 最终结果或达到最佳效果的时机,无论您是 具有此方法一个或另一个变体的两个CompletableFuture

In my understanding with the thenCompose( and thenComposeAsync) signatures as below:

public <U> CompletableFuture<U> thenCompose(
    Function<? super T, ? extends CompletionStage<U>> fn) {
    return uniComposeStage(null, fn);
}

public <U> CompletableFuture<U> thenComposeAsync(
    Function<? super T, ? extends CompletionStage<U>> fn) {
    return uniComposeStage(asyncPool, fn);
}

The result of the second CompletableFuture can depends on the previous CompletableFuture in many situations, should we use thenCompose and not thenComposeAsync in those case?

What if we have blocking code in the second CompletableFuture?

This is a similar example which was given by person who answered similar question here: Difference between Java8 thenCompose and thenComposeAsync

public CompletableFuture<String> requestData(Quote quote) {
    Request request = blockingRequestForQuote(quote);
    return CompletableFuture.supplyAsync(() -> sendRequest(request));
}

To my mind in this situation using thenComposeAsync can make our program faster because here blockingRequestForQuote can be run on different thread. But based on the writer's opinion we should not use thenComposeAsync because it depends on the first CompletableFuture result(that is quote).

我的问题是:

作家说的话是正确的吗?

在这种情况下,第二次的结果 CompletableFuture取决于第一个,因此对 最终结果或达到最佳效果的时机,无论您是 具有此方法一个或另一个变体的两个CompletableFuture