84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我理解的对volatile变量的重排序(编译器重排序和处理器重排序),主要目的是为了实现对volatile的写,Happend-Before对volatile的读
volatile
所以,按照我理解的话,并不需要像图表中那么严谨
欢迎选择我的课程,让我们一起见证您的进步~~
In the case of multi-threading, there is a synchronization problem between the thread working memory and the main memory. Volatile is only available immediately on the main memory
In the case of multi-threading, there is a synchronization problem between the thread working memory and the main memory. Volatile is only available immediately on the main memory