CompletableFuture::supplyAsync(() -> IO bound queries)
How do I chose an Executor for CompletableFuture::supplyAsync to avoid polluting the ForkJoinPool.commonPool()
.
There are many options in Executors
(newCachedThreadPool
, newWorkStealingPool
, newFixedThreadPool
etc)
And I read about new ForkJoinPool here
How do I chose the right one for my use case ?
Aucun commentaire:
Enregistrer un commentaire