Java ServiceExecutor terminating condition

后端 未结 4 1861
我在风中等你
我在风中等你 2021-01-22 07:21

I\'m new to java executor stuff.

I\'m using Java\'s ExecutorService to launch several threads to process data.

Executor executor = Executors.newFixedThre         


        
4条回答
  •  执笔经年
    2021-01-22 07:42

    Use shutdown method to gracefully shutdown from interface ExecuterService, as Quoi suggested it still runs even if threads are done. You can use submit anytime after that for new work. Other utility methods are here

提交回复
热议问题