???????Java???????????
???????????? ???????[ 2013/3/22 11:15:49 ] ????????
????JMM?????
??????JMM??????????????????JMM??????????????????????
?????? ????????????????á???????????????????????????????????????????????????????д????
?????? ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????ì???????JSR-133??????????JMM????????????????????????????????????????????????????????????棬??????????????????????????????ɡ??????????????JSR-133????????????????
??????????????????????????????????????????
double pi = 3.14; //A
double r = 1.0; //B
double area = pi * r * r; //C
?????????????????????????????????happens- before?????
????1??A happens- before B??
????2??B happens- before C??
????3??A happens- before C??
????????A happens- before B??happens- before?????????A??????е??????B???????A????????????????B???????? ??????????????????????A??B????????????????????н?????????????????????????????????????????????????????????????????????????????????3??happens- before????У????2??3???????????1?????????????JMM??happens- before?????????????????????????
?????? ?????????н??????????
?????? ???????????н??????????
????JMM??????????????????????????????????
?????? ????????????н??????????JMM???????????????????????????????
?????? ??????????????н??????????JMM?????????????????????JMM????????????????
??????????JMM???????????
????????????????????
?????? JMM??????????happens- before????????????????????JMM??happens- before??????????????????????????????????????????????Щ????????????????????????????????????A happens- before B????
?????? JMM???????????????????????????????????????????????????????JMM?????????????????????????????????н????????????????????????????????????????????????????????С????磬???????????????μ???????????????????????????????????????????????????磬???????????????μ????????????volatile???????????????????????????????????????volatile???????????????????????????Щ????????????????н??????????????????Ч???
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11