0

How is a monitor and lock implemented in java, I know that the Object class provides us methods like wait() and notify() which control thread access, but at its core how is the monitor and lock implemented, like is there any specific resource or code that represents the monitor?

TejusN
  • 77
  • 9
  • Partial answer: https://stackoverflow.com/questions/9848616/whats-the-meaning-of-an-objects-monitor-in-java-why-use-this-word – Turing85 Jan 25 '20 at 19:07
  • 2
    For `wait()` and `notify()`: the method are implemented natively. – Turing85 Jan 25 '20 at 19:09
  • to add to @Turing85: http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/java/lang/Object.java – Nir Alfasi Jan 25 '20 at 19:11

0 Answers0