[英]where are the threads waken up from Object.notifyAll and failing to get the lock?
Below is how monitor works: monitor 以下是监视器的工作原理: 监视器
The monitor is a fundamental conception that you should understand. 显示器是您应该理解的基本概念。 It is better to read about it somewhere. 最好在某个地方阅读它。
In short, I could say that there are some major principles: 简而言之,我可以说有一些主要原则:
The answer to your question is - when you call notifyAll() method, all threads from Wait Set go to Entry Set. 您的问题的答案是 - 当您调用notifyAll()方法时,来自Wait Set的所有线程都转到Entry Set。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.