March 2003
Intermediate to advanced
656 pages
39h 30m
English
notify, notifyAll
c.notify( )
c.notifyAll( )
notify wakes up one of the threads waiting on
c. The calling thread must hold
L before it calls
c
.notify( ), and
notify does not release
L. The woken-up thread does not become
ready until it can acquire L again.
Therefore, the calling thread normally calls
release after calling notify.
notifyAll is like notify, but
wakes up all waiting threads, not just one.
Read now
Unlock full access