shutdown and awaitTermination which first call have any difference?

前端 未结 9 1210
渐次进展
渐次进展 2020-12-12 14:44

What is the difference between

ExecutorService eService = Executors.newFixedThreadPool(2);
eService.execute(new TestThread6());
eService.execute(new TestThre         


        
9条回答
  •  醉酒成梦
    2020-12-12 15:06

    You need to call shutdownNow() method after the awaitTermination() method call happened. Then only you can find out the actual usage of awaitTermination() method.

提交回复
热议问题