notifyAll()
函数会唤醒所有正在等待的线程。
notifyAll()
范例可以参考ThreadCondition.notify()
章节的内容。
notifyAll()
函数逐个唤醒所有等待中的线程,被唤醒的线程重新获取线程锁。
{@fun/Threads/ThreadCondition/notify notify}, {@fun/Threads/ThreadCondition/wait wait}, {@fun/Threads/ThreadCondition/acquire acquire}, {@fun/Threads/ThreadCondition/release release}
notify wait