From: Eric Hodel Date: 2006-03-12T01:01:53+09:00 Subject: Re: Threads and Deadlocks On Mar 11, 2006, at 8:53 AM, Mc Osten wrote: > It seems that the standard ruby interpreter is able to detect > deadlocks (at least it detects when all threads are deadlocked). > > In this case it terminates. It appears it doesn't do throwing an > exception... There's nowhere to throw an exception to, all threads are blocked from running. > Where can I find more infos about this? Can I insert into this and > break the deadlock in a (hopefully) softer way (I could know a > specific thread *can* be terminated). 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. > Where can I find some infos about the deadlock revelation > algorithms it uses and such? This is just part of the "default" > ruby interpreter or it is defined in ruby itself? It is part of the interpreter and written in C. > Moreover how are regarded threads in the Ruby community? When I use > Python it's usually not advised and it is encouraged to move to an > asynchronous model (Twisted). Everybody uses threads in Ruby. -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com