CompletableFuture.defaultExecutor()
Ben Manes
ben.manes at gmail.com
Wed May 18 05:17:01 UTC 2022
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