Author
Question about Deadlock
Alexander Danilou
Greenhorn
Joined: May 08, 2009
Posts: 28
posted May 22, 2009 07:46:06
0
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
posted May 22, 2009 22:43:18
0
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
posted May 23, 2009 04:29:44
0
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
posted May 26, 2009 20:06:37
0
Statement: A call to wait()/notify() will NOT prevent a deadlock.
True or false?
Henry Wong
author
Sheriff
Joined: Sep 28, 2004
Posts: 14606
posted Jun 13, 2009 08:44:20
0
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