![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
并发
文章平均质量分 82
学未者
宝剑锋从磨砺出,梅花香自苦寒来。
展开
-
Thread类join方法
首先打开源码查看join()方法: public final void join() throws InterruptedException { join(0); }原创 2021-06-10 23:08:04 · 253 阅读 · 0 评论 -
SimpleDateFormat类的线程安全问题
SimpleDateFormat类来解析和格式化日期和时间类型的数据. 在高并发情况下会发生线程安全问题,代码如下: public class SimpleDateFormatTest007 { //执行总次数 private static final int EXECUTE_COUNT = 1000; //同时运行的线程数量 private static final int THREAD_COUNT = 20; //SimpleDateFormat对象原创 2021-06-09 00:06:50 · 99 阅读 · 0 评论