WaitNotifyExample -- controlling thread
activity with wait and notify methods.
This applet creates three threads that repeatedly wait
on the applet's monitor.
Experiment:
- Press the notify/notifyAll buttons repeatedly,
in any order.
- Leave the page, return to it, and press away ...
- Make your own copy of the applet, change the source
so that different waiting threads have different
priorities, and retest the behavior.
The source.