This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling notify() multiple times

 
Michael Remijan
Author
Ranch Hand
Posts: 130
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