Results 1 to 2 of 2
  1. #1
    jon80's Avatar
    jon80 is offline Senior Member
    Join Date
    Feb 2008
    Location
    Malta (EU)
    Posts
    211
    Rep Power
    7

    Default [SOLVED] Deadlock ?

    "Every object has an intrinsic lock associated with it. By convention, a thread that needs exclusive and consistent access to an object's fields has to acquire the object's intrinsic lock before accessing them, and then release the intrinsic lock when it's done with them. A thread is said to own the intrinsic lock between the time it has acquired the lock and released the lock. As long as a thread owns an intrinsic lock, no other thread can acquire the same lock. The other thread will block when it attempts to acquire the lock. " (1)

    Is this a potential source for a deadlock?

    :confused:

    Reference
    1. Intrinsic Locks and Synchronization (The Java™ Tutorials > Essential Classes > Concurrency)
    2. Deadlock (The Java™ Tutorials > Essential Classes > Concurrency) Deadlock (The Java™ Tutorials > Essential Classes > Concurrency)


    NOTES
    1. I have already read How to ask questions the smart way btw :) (http://catb.org/esr/faqs/smart-questions.html#intro)
    Last edited by jon80; 06-14-2009 at 01:52 PM.

  2. #2
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    6

    Default

    The only source for a deadlock.

    Deadlocks occur when two threads are waiting to acquire a locks that the other holds.
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

Similar Threads

  1. Analysing for starvation, deadlock and mutual exclusion
    By scarymovie in forum New To Java
    Replies: 0
    Last Post: 03-07-2009, 06:58 AM
  2. Thread Deadlock
    By ajeeb in forum New To Java
    Replies: 2
    Last Post: 01-16-2009, 02:49 AM
  3. How to create a simple deadlock
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-09-2008, 06:36 PM
  4. Deadlock detection tools documentation
    By goldhouse in forum Threads and Synchronization
    Replies: 0
    Last Post: 07-18-2007, 05:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •