目录
1.shutdown()/shutdownNow()+循环isTerminated()判断
2.shutdown()/shutdownNow()+awaitTermination()
线程池中submit() 和 execute()方法有什么区别?
如何停止线程interupt(推荐),suspend/resume、stop(不推荐)
1.关于java.util.concurrent.TimeUnit.SECONDS.sleep(3);的单位:
package java.util.concurrent.Executors;
Executors是juc包下的类,Executor是juc包下的接口
Executors类中提供了四种线程池:
分别为
newCachedThreadPool、
newFixedThreadPool 、
newScheduledT

订阅专栏 解锁全文
441

被折叠的 条评论
为什么被折叠?



