Hi,all. I want to make it clear if the method notify() only wakes up a thread which has called the method wait() ? I got a program.I find that there's no wait() in it.So what does notify() do ?
Bartender, I think notify wothout wait() will do nothing. That means, no compile time exception or runtime error and just only goes to check whether any thread is waiting wait set/pool there? Found nothiny as waiting so returns.....correct me if i m wrong.
------------------ azaman [This message has been edited by Ashik uzzaman (edited August 19, 2001).]
Ashik Uzzaman Senior Member of Technical Staff, Salesforce.com, San Francisco, CA, USA.
Marcela Blei
Ranch Hand
Joined: Jun 28, 2000
Posts: 477
posted
0
Ashik: You are right, but remember that this method should be called by a thread that is the owner of this object's monitor. So if it's not called in that way you will get an: IllegalMonitorStateException