Shouvik Bhattacharya wrote:I am finding difficulty in comprehending the fact that Matthew told regarding two different object in action....... as per my understanding goes about I feel that I am notifying on the same object on which I wanted to wait isn't it......I mean no offence to Matthew's view but I am just unable to understand I feel that as per logic and common sense the thread is supposed continue waiting unless it gets notified isn't it.......I tried google but no answer.......please help understand guys.
Not sure how Google can help you here -- as this has nothing to do with a concept. Your code waits on one object, and notifies on another. For notifications to work, it has to be the same object -- it is bug in your application, and Google doesn't do code reviews of specific code, does it?
And as for the other response, regarding waiting on the Thread instance, you can search these forums -- as accidentally notifying on the thread instance seems to be a common mistake.
Henry