Name
notify, notifyAll
Synopsis
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.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.