aspose file tools
The moose likes Threads and Synchronization and the fly likes thread calls wait and no other thread calls notifyAll or notify Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "thread calls wait and no other thread calls notifyAll or notify" Watch "thread calls wait and no other thread calls notifyAll or notify" New topic
Author

thread calls wait and no other thread calls notifyAll or notify

Moni Patil
Greenhorn

Joined: Feb 03, 2005
Posts: 9
What happens when a thread calls wait and no other thread calls notifyAll or notify
Tom Hill
Ranch Hand

Joined: Aug 24, 2003
Posts: 115
Hi there!
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.


Tom
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
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.

Layne


Java API Documentation
The Java Tutorial
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: thread calls wait and no other thread calls notifyAll or notify
 
Similar Threads
Simple Question
thread
Regarding a MasterKey question from the CD
Set Timer
Thread wakes (get lock) without notify() or notifyAll()