NoBlogDefFound: Which thread executes CompletableFuture's tasks and callbacks?
November 30, 2015 CompletableFuture Running tasks This is the fundamental part of the API. There is a convenient supplyAsync() ExecutorService.submit() The problem is, CompletableFuture s, all parallel streams and all applications deployed on the same JVM (if you are unfortunate to still use application server with many deployed artifacts). This hard-coded, unconfigurable thread pool is completely outside of our control, hard to monitor and scale. Therefore you should always specify your own Executor ExecutorService pool = Executors.newFixedThreadPool(10); final CompletableFutureRead full article from NoBlogDefFound: Which thread executes CompletableFuture's tasks and callbacks?
No comments:
Post a Comment