[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: ThreadError w/WEBrick

Nathaniel Talbott

11/26/2003 12:42:00 PM

ts [mailto:decoux@moulon.inra.fr] wrote:

> N> - Can someone give me an explanation of what "ThreadError:
> stopping
> N> only thread" means? What is the general case that causes
> this error
> N> to be raised?
>
> svg% ruby -e 'Thread.new { Thread.stop }'
> svg%
>
> svg% ruby -e 'Thread.stop'
> -e:1:in `stop': stopping only thread (ThreadError)
> note: use sleep to stop forever from -e:1
> svg%

Interesting... so, if calling Thread#stop causes an error, why is it called
from thread.rb line 276? Why does it even exist?


Nathaniel

<:((><