• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling notify() multiple times

 
Michael Remijan
Author
Ranch Hand
Posts: 131
7
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to have 1 thread waiting for a notify() call on an object. Does anyone know would happen to that thread if notify() was called a number of times? would the notify() calls be "queued" in some way so that instead of going back to sleep the thread would continually wake up for as many times as notify was called?
Thanks, Mike
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
notify() has no effect if there aren't waiting threads.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic