What does intrinsic lock actually mean for a Java class?

前端 未结 7 1663
逝去的感伤
逝去的感伤 2021-02-04 10:50

In order to properly understand the issues and solutions for concurrency in Java, I was going through the official Java tutorial. In one of the pages they defined Intrin

7条回答
  •  醉酒成梦
    2021-02-04 11:17

    Yes, you won't be able to call other synchronized method on the same object, because of the intrinsic lock. Which is at object level, only 1 thread will acquire it.

提交回复
热议问题