...
Ensure that a thread that holds locks on other objects releases them appropriately, before entering the wait state. Additional guidance on waiting and notification in available in CON22 THI03-J. Always invoke wait() and await() methods inside a loop and CON23-J. Notify all waiting threads instead of a single thread.
...