摘要: shuts down an ExecutorService in two phases, first by calling shutdown to reject incoming tasks, and then calling shutdownNow, if necessary, to cancel any lingering tasks: void shutdownAndAwaitTermination(ExecutorService pool) { pool.shutdown(); // Disable new tasks from being submitted try { ... 阅读全文
posted @ 2014-04-10 14:21 qiangzhu 阅读(314) 评论(0) 推荐(1) 编辑