JAVA中间Object.wait()或者Condition.await()这样的条件状态满足条件之后重新获取锁的顺序问题?
伊谢尔伦
伊谢尔伦 2017-04-18 10:49:55
0
2
867

rt,谁能给解释下?或者给点路子怎么找相关资料?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(2)
黄舟

If multiple threads wait, it should be based on the thread priority. Those with the same priority are random. I can’t remember clearly, so I’ll check the internet again and change my answer.

洪涛

Object.wait()
Needs notify() or notifyAll() to wake up the thread. The former randomly wakes up a thread and then acquires the lock. There is no competition for the lock. The latter compete randomly by priority.
Condition to be added.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!