Java多線程與併發05: Executors

使用Executor   使用executor可以實現類似與Thread的方法開闢線程: 使用execute方法執行一個Runnable接口的實現。但是存在很多限制: 1. 無法獲取返回值 2. 無法知道運行的進度,無法取消任務。 3. 無法執行批量的任務。 4. 無法終止線程。   ExecutorService   boolean awaitTermination(long timeout,
相關文章
相關標籤/搜索