aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Question about Deadlock Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Programmer Certification (SCJP/OCPJP)
Reply locked New topic
Author

Question about Deadlock

Alexander Danilou
Greenhorn

Joined: May 08, 2009
Posts: 28
One of MasterExam questions in K&B book suggests that wait()/notify() will NOT prevent deadlock.
How can it be?
My understanding that if wait() is called then thread releases the lock, so it can resolve at least simple deadlock situation with two threads and two objects
I'm looking at example on page 745 (K&B 6)
Can somebody explain please
Thanks,
Byju Joy
Ranch Hand

Joined: Sep 06, 2005
Posts: 84
I'm looking at example on page 745 (K&B 6)

Can you quote the same?
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6371

I am having a little difficulty understanding the question. Can you elaborate with an example or quote some code and sources ?


SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
Alexander Danilou
Greenhorn

Joined: May 08, 2009
Posts: 28
Statement: A call to wait()/notify() will NOT prevent a deadlock.
True or false?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 14606

Duplicate topic... please use most recent one...

http://www.coderanch.com/t/449466/Programmer-Certification-SCJP/certification/lingering-wait-notify-deadlock

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
 
subject: Question about Deadlock
 
Threads others viewed
Livelock same as race condition?
K&B
deadlock
Threads, wait, notify and deadlocks.
lingering wait()/notify() and deadlock doubt
MyEclipse, The Clear Choice