Regarding Notify()
Posted
by
user1334074
on Stack Overflow
See other posts from Stack Overflow
or by user1334074
Published on 2012-04-15T04:05:07Z
Indexed on
2012/04/15
5:30 UTC
Read the original article
Hit count: 87
java
I was going through threads and I read that ..The notify() method is used to send a signal to one and only one of the threads that are waiting in that same object's waiting pool. The method notifyAll() works in the same way as notify(), only it sends the signal to all of the threads waiting on the object....
Now my query is that if Lets say I have 5 threads and one main thread , so initially the main thread starts and then five other threads start , Now I want to send notification to third thread only , How could it be possible with the use of notify(), since here I am sending notification to third thread only , please advise.
© Stack Overflow or respective owner