Example
TBD

Solution
For efficiency considerations, avoid using sleep().
Use wait() and notifyAll() instead.