A lock release or lock notify operation is analogous to a scheduling dispatch operation in the sense that the thread at the head of the highest-priority queue is acted on.
锁释放或锁notify操作与调度分派操作类似,因为都是对最高优先级队列头部的线程起作用。
There is an interaction between notification and locking — to wait or notify on an object, you must hold the lock for that object.
通知与锁定之间有一个交互——为了在对象上wait或notify,您必须持有该对象的锁。
应用推荐