FixedThreadPool和CachedThreadPool之间的区别

时间:2018-06-20 09:56:10

标签: java java-8 completable-future

FixedThreadPool有什么区别,可以用作风箱:

ExecutorService ex = Executors.newFixedThreadPool();

CachedThreadPool

ExecutorService ex = Executors.newCachedThreadPool();

CompletableFuture上:

CompletableFuture<Integer> promise = CompletableFuture.supplyAsync(()->{.........}, ex);

0 个答案:

没有答案