Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

notify

 
josephine chen
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does notify stop thread execution???
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
notify() method resumes execution of a waiting thread.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All notify does is move a waiting thread to ready state. The current thread (the one that invoked notify) will still run until it stops for some other reason - most likely, either it will finish executing the code it's supposed to execute, or eventually the thread scheduler will pause it so another thread can have a chance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic