I want to know when we notify all threads from a wait() method which thread comes out first ...means it comes through priority or through ageing. sachin.
Joined: Jan 05, 2001
It's random - there's no determining which will acquire the lock after notifyAll() is called.
Joined: Jan 01, 2001
you cannot determine which thread comes out of the wait state and to seek the lock state of the object.ageing is not the concept there.
Joined: Jan 03, 2001
One thing you can do to determine which thread runs after a notifyAll is implement the Specific Notification Pattern found here. Peter Haggar ------------------ Senior Software Engineer, IBM author of: Practical Java