摘要: https://mp.weixin.qq.com/s?__biz=MzU1Nzg4NjgyMw==&mid=2247491213&idx=1&sn=867813b448d6d2bc813f5e494a665e4f&chksm=fc2fa285cb582b9371872658bd10b5afeb8a9 阅读全文
posted @ 2021-06-01 15:11 紫枫夜羽 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 1. 通过Executors创建线程池的弊端 下面是创建定长线程池(FixedThreadPool)的一个例子,严格来说,当使用如下代码创建线程池时,是不符合编程规范的。 ExecutorService fixedThreadPool = Executors.newFixedThreadPool(5 阅读全文
posted @ 2021-06-01 15:01 紫枫夜羽 阅读(75) 评论(0) 推荐(0) 编辑