2020-11-12:java中as-if-serial语义和happen-before语义有什么区别?

福哥答案2020-11-12:

as-if-serial语义单线程执行结果不被改变。
happen-before语义正确同步的多线程执行结果不被改变。
***
这道题网上已经说烂了,就不必重复了。
[happens-before 规则](https://blog.csdn.net/liu_dong_liang/article/details/80391040)
[深入理解happens-before和as-if-serial语义](https://www.jb51.net/article/161668.htm)

原文地址:https://www.cnblogs.com/waitmoon/p/13966607.html