wait/notify Thread Notification Mechanism
wait() forces a thread to wait and release the object locks until another thread invokes notify() or notifyAll() on the same object.
notify() wakes up a single thread that is waiting on this object's monitor.
notifyAll() wakes up all threads that are waiting on this object's monitor.
Parent topic: Java Synchronization Primitives