notify() (cont’d)
•
Note that you don’t specify what is
being awoken in notify().
If there are
more than 1 thread waiting on the
same condition, you have no control of
which awakens.
•
notify() only awakens 1 thread.
•
notifyAll() awakens
all
threads.