When should i used notify() and notifyall() methods on threads

Showing Answers 1 - 2 of 2 Answers

Sailaja V

  • Mar 11th, 2005
 

to wakes up the threads which are in waiting stateaddition notes:-notify() wakes up a single thread which is waiting on the object's lock notifyAll() wakes up ALL waiting threads; the scheduler decides which one will run they can only be used within synchronized code

  Was this answer useful?  Yes

sawati dash

  • Apr 18th, 2005
 

used in synchronised method to bring the thread for wait state.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions