educative.io

CompletableFuture: Introduction - Java 8 for Experienced Developers: Lambdas,

Hi,
I run the code below
“However, if we want, we can provide our own Executor to the runAsync() method as well. Here is the code for it.”
It says “Execution Timed Out!”. Is there something wrong with the code? I didn’t make any change.

Same problem for the last code block. Seems like it happens when we do this
Executor executor = Executors.newFixedThreadPool(5);

Same problem in

  1. thenApplyAsync(Function<T, R> function, Executor executor)

Thank you!
Boao