JoyThreads example implementation
JoyThreads implemented with wait and notifyAll methods