Comments (3)
@Sheamus2340 这个method 少了synchronized 关键字。
private static synchronized void method() {
}
from java-concurrency.
原文:从上图中就可以看出来,执行静态同步方法的时候就只有一条monitorexit指令,并没有monitorenter获取锁的指令。
问题:monitorexit不是执行静态同步方法时候的指令,应该是同步代码块执行异常时会执行的指令。如果同步代码块执行正常,就会执行了goto指令然后直接跳转去执行了invokestatic指令(静态方法)。
from java-concurrency.
这一节图片挂了好多,能给补一下么?感谢大佬
from java-concurrency.
Related Issues (19)
- 关于《彻底理解volatile》中示例代码的问题 HOT 4
- 07.三大性质总结:原子性、可见性以及有序性 HOT 1
- 02 节里的图片不显示 HOT 2
- 文中源碼是java 哪個版本?
- Exchanger 代碼有問題
- 建议创建一个gitbook方便阅读 HOT 2
- 关于AbstractQueuedSynchronizer类中enq方法并没有让tail指向新的尾节点的两个疑问 HOT 1
- CountDownLatchDemo HOT 1
- 内存使用计算问题
- 并发编程的优缺点中几个错别字
- 线程状态转换的错误,WAITING不能直接转变为RUNNABLE
- 彻底理解synchronized章节 3.2 Java对象头 里的图片未显示
- 感觉原子类的分类不太合理,有点乱,如下分类感觉更好 HOT 1
- 最后的例子 HOT 1
- 关于偏向锁升级为轻量级锁的疑问
- 图挂了
- 图片不显示格式问题 HOT 1
- 3.java内存模型以及happens-before规则
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-concurrency.