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}