网络 唤醒所以线程;唤醒所有的线程
You may have noticed that the implementation in Listing 1 uses notify() instead of notifyAll().
您可能已经注意到了清单 1 中的实现使用的是 notify() 而不是 notifyAll() 。
Why isn´t calling wait(), notify() or notifyAll() without a synchronized block not a compiler error?
为什么不打电话给wait(),没有一个同步块不是一个编译错误notify()或notifyall()?
The root Object class includes some special methods for communicating across threads -- wait(), notify(), and notifyAll().
根类 Object 包含某些特殊的方法,用来在线程的 wait() 、 notify() 和 notifyAll() 之间进行通信。
The wait() method tells the current thread to go into an inactive state and wait for another thread to call notifyAll() on that object.
wait()方法将通知当前线程进入非活动状态,并等待另一个线对该对象调用 notifyAll()。