[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: What happened when i invoke Thread.current.stop

hemant

12/24/2007 11:35:00 AM

On Dec 24, 2007 4:34 PM, Jason Yuan <jiesong.yuan@gmail.com> wrote:
>
> th1 = Thread.new {
> Thread.current.stop # it should be Thread.stop
> puts "i am running"
> }
>
> th1.run # some error

put Thread.abort_on_exception = true at top and get more enlightening
error. In a nutshell "stop" is a class method not an instance method.

Hence you can't do:

Thread.current.stop

>
> I know it should be Thread.stop, bu t anyone can tell me why?
>
> thanks for the help!
>
>



--
Let them talk of their oriental summer climes of everlasting
conservatories; give me the privilege of making my own summer with my
own coals.

http://g...

1 Answer

Jason Yuan

12/24/2007 1:43:00 PM

0

Thanks for the help!