Re: Threads and Deadlocks
- From: Mc Osten <riko@xxxxxxxxxxxxx>
- Date: Sat, 11 Mar 2006 17:38:47 +0100
Eric Hodel ha scritto:
There's nowhere to throw an exception to, all threads are blocked from running.
What happens then? Is there any documentation about this (I'd rather not to read directly the source, but if there is no other way...)
No. The error is in your programming. Terminating a thread won't break the deadlock because either it is holding a resource other threads are waiting on or it is waiting on a resource some other thread is using and sleeping.
No. The error is not in my programming since this is no real case.
The deadlock is intentionally created in the most obvious way just to see what happened; in this sense the program is correct, it does exaclty what it was meant to: it deadlocks.
If I can somehow trap the event that makes the ruby interpreter terminate I could obviously recover the deadlock, since blocked resources would have been constructed to be recoverable.
Probably I am not able to explain what I'm looking for: this is not real case programming. This are kind of teaching examples.
It is part of the interpreter and written in C.
So I can't assume JRuby (for example) will act the same, can I?
Everybody uses threads in Ruby.
Ok.
.
- Follow-Ups:
- Re: Threads and Deadlocks
- From: Charles O Nutter
- Re: Threads and Deadlocks
- From: Robert Klemme
- Re: Threads and Deadlocks
- References:
- Threads and Deadlocks
- From: Mc Osten
- Re: Threads and Deadlocks
- From: Eric Hodel
- Threads and Deadlocks
- Prev by Date: Re: Help me understand why the Ruby block is slower than wit
- Next by Date: Re: Help me understand why the Ruby block is slower than wit
- Previous by thread: Re: Threads and Deadlocks
- Next by thread: Re: Threads and Deadlocks
- Index(es):
Relevant Pages
|
Loading