This discussion is archived
3 Replies Latest reply: Oct 25, 2006 9:02 AM by 807607 RSS

Deadlock

807607 Newbie
Currently Being Moderated
How could one detect a deadlock?
  • 1. Re: Deadlock
    807607 Newbie
    Currently Being Moderated
    You can't. If there would be a precise definition what a deadlock looks like, java could prevent or solve it itself. But it can't.

    This is the nasty part of multithreading: errors don't have to be deterministic. You have to make sure that no deadlock can happen, BEFORE it happens!
  • 2. Re: Deadlock
    807607 Newbie
    Currently Being Moderated
    Depends on what you mean by "deadlock" (database transaction, "synchronized" keyword, general deadlock detection) and "detect" (static, dynamic).

    http://en.wikipedia.org/wiki/Deadlock
    http://www.google.com/search?q=%22deadlock+detection%22
  • 3. Re: Deadlock
    807607 Newbie
    Currently Being Moderated
    thanks