CompletableFuture.defaultExecutor()
August Nagro
augustnagro at gmail.com
Thu May 19 22:08:44 UTC 2022
Hi Ben, virtual threads by default use their own FJP, which uses a
different execution mode then the common pool.
Is Caffeine Cache the use case in mind here?
On Wed, May 18, 2022, 4:48 AM Ben Manes <ben.manes at gmail.com> wrote:
> The default executor for asynchronous tasks is either
> ForkJoinPool.commonPool() or one that creates a new platform thread per
> task if the JVM is restricted to a single logical cpu. Since
> CompletableFuture is commonly used with I/O, it is easy to accidentally
> block all of the common pool's threads. In the future, is this default
> likely to change to use virtual threads?
>
> Cheers.
>
More information about the loom-dev
mailing list