A thread can use Object.wait() to block until another thread calls notify() or notifyAll() on that object.
Object.wait()
notify()
notifyAll()
But what if a threa
They could all use the same mutex. You consumer is waiting on that mutex, the both other notify on that mutex when the first can proceed.