Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Threads and Synchronization
thread calls wait and no other thread calls notifyAll or notify
Joined: Feb 03, 2005
Sep 04, 2005 23:49:00
What happens when a thread calls wait and no other thread calls notifyAll or notify
Joined: Aug 24, 2003
Sep 05, 2005 04:44:00
The thread will keep waiting until it is notified.
And if it isnt notified, it will attempt to wait forever.
So youll probably kill the process by some means.
Joined: Dec 06, 2001
Sep 05, 2005 14:04:00
In at any time, all threads call wait() without calling notify() or notifyAll(), then it is called a deadlock. The process will continue to run without doing anything, so this should be avoided at all costs.
Java API Documentation
The Java Tutorial
It is sorta covered in the
JavaRanch Style Guide
subject: thread calls wait and no other thread calls notifyAll or notify
Regarding a MasterKey question from the CD
Thread wakes (get lock) without notify() or notifyAll()
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013