https://www.jianshu.com/p/25e243850bd2?appinstall=0 永远都要把wait()放到循环语句里面。 之所以我们应该尽量使用notifyAll()的原因就是,notify()非常容易导致死锁