![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
多线程高并发学习笔记
文章平均质量分 81
Ocean曈
海边的日出,菜鸟博主,攀爬历程
展开
-
volatile标识字段会造成:当前任务线程的内存副本中的所有数据从主内存更新最新数据
首先看代码: //实验一 public class Test1 { public volatile int i = 0; public int flag = 1; public static void main(String[] args) throws InterruptedException { Test1 test1 = new Test1(); Thread a = new Thread(()->{ try原创 2021-01-06 16:46:59 · 400 阅读 · 11 评论 -
多线程高并发学习笔记脑图
原创 2020-09-19 11:52:06 · 277 阅读 · 0 评论