Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up老哥可能对synchronized底层原理有误解或者不清楚java对象的内存布局 #649
Open
Labels
Comments
|
我还是没太搞太清楚,有时间再好好研究下。 |
|
老哥,太强了,解惑了。 |
|
活到老,学到老,老哥太强了 |
|
Synchronized is a keyword it means that if any method has that than only it would check for lock or monitor otherwise not. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


具体的可以参照我写的: https://github.com/guang19/framework-learning/blob/dev/jdk-jvm-juc/Jdk&Jvm&Juc.md
然后关于老哥在对于synchronized的优化中的这些描述:

然后这句描述 : “轻量级锁在无竞争的情况下使用 CAS 操作去代替使用互斥量。而偏向锁在无竞争的情况下会把整个同步都消除掉。”
其它的地方建议老哥改的具体一点,虽然您写的确实让人比较好懂,但还是有地方让人较为疑惑。。