nobu / ruby-lang.org wrote:
> Hi,
> 
> At Sat, 11 Mar 2006 23:53:43 +0900,
> Mc Osten wrote in [ruby-talk:183655]:
>> 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...
> 
> ThreadError will be raised in the main thread.
> 
>   $ ruby -e 'begin Thread.start{Thread.main.join}.join; rescue
>   ThreadError => e; p e; end' #<ThreadError: Thread#join: deadlock
> 0xb7df6824 - mutual join(0xb7de9368)> 

Hm, but why then isn't it caught by a clause "rescue Exception => e"?

Wondering...

    robert