Programming Tutorials

Comment on Tutorial - wait(), notify() and notifyAll() in Java - A tutorial By Jagan



Comment Added by : Armin

Comment Added at : 2009-07-26 07:25:09

Comment on Tutorial : wait(), notify() and notifyAll() in Java - A tutorial By Jagan
notify does NOT wake up the first thread waiting. it wakes up an abitrary thread waiting. notifyAll is almost always better than notify. A thread woken up by wait still has to compete with all other threads that are trying to lock on the object.

cheers
Armin


View Tutorial