首页
技术面试题 3000
synchronized的实现机制是什么?
synchronized的实现机制是什么?
答案解析
依赖JVM的monitorenter和monitorexit指令实现。每个对象有一个监视器(monitor),线程获取monitor后才能进入同步块。
返回列表
返回首页