deadlock : Java Glossary
home D words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
Go to : punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all)
deadlock
When two threads interfere in such a way that neither can continue. Sometimes called deadly embrace or Mexican standoff. There is absolutely nothing you can do with a deadlocked thread. You cannot stop it, you cannot interrupt it, you cannot tell it to stop trying to get a lock, and you also cannot tell it to let go of the locks that it owns. This is one of the criticism in Doug Lea’s book about the primitive monitor-based locking mechanisms. Once you try to get a lock, you will forever try and never give up. The concurrency handling mechanisms of Doug’s book are now in the java.util.concurrent package of JDK 1.5.
book_cover recommend book⇒Concurrent Programming in Java: Design Principles and Patterns, Second Edition
 paperback
ISBN13:978-0-201-69581-6
ISBN10:0-201-69581-2clickcounter
publisher:Addison-Wesley
published:1996-11
by:Doug Lea
339 pages. You can read it on-line. This is the book on Threads and concurrent programming.
Canadian flag amazon.ca. amazon.com. American flag
Canadian flag chapters.indigo.ca . powells.com American flag
French flag amazon.fr. barnesandnoble.com American flag
German flag amazon.de. amazon.co.uk. UK flag
The classic way it happens is by thread 1 locking object a then trying to get a lock on object b, while thread 1 gets a lock on object b and tries to get a lock on object a. The simplest way to avoid this is to always acquire locks in canonical order.

CMP_homejump to top
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] The information on this page is for non-military use only.
You are visitor number 9,020. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/deadlock.html J:\mindprod\jgloss\deadlock.html