*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Can this be a case of deadlock ?And how to determine it output ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Can this be a case of deadlock ?And how to determine it output ?" Watch "Can this be a case of deadlock ?And how to determine it output ?" New topic
Author

Can this be a case of deadlock ?And how to determine it output ?

A Agr
Ranch Hand

Joined: Feb 10, 2009
Posts: 32
Himalay Majumdar
Ranch Hand

Joined: Sep 28, 2008
Posts: 324
Yes it is ...try the following code



Getting a deadlock is very unlikely to happen so usually..you will get an output under normal condition. Here by putting sleep method in .I am making it more probable for a deadlock to happen. I many situations..even without a sleep() method..the thread scheduler can behave in such way..that creates deadlock situation.


SCJP 1.6, SCWCD 5.0, SCBCD 5.0 [loading..]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can this be a case of deadlock ?And how to determine it output ?
 
Similar Threads
Threads
Two similar question about thread
Inner Thread Classes
more fun Qestions, thread=)
Does this code has possible deadlock situation?