線程池的四種實現方式

ExecutorService是線程池接口。它定義了4中線程池: 小程序 1.newCachedThreadPool:服務器 底層:返回ThreadPoolExecutor實例,corePoolSize爲0;maximumPoolSize爲Integer.MAX_VALUE;keepAliveTime爲60L;unit爲TimeUnit.SECONDS;workQueue爲SynchronousQ
相關文章
相關標籤/搜索