Robert Klemme
10/9/2008 7:27:00 AM
2008/10/8 christoforever@gmail.com <christoforever@gmail.com>:
> On Oct 8, 10:32 am, Pit Capitain <pit.capit...@gmail.com> wrote:
>> 2008/10/8 christofore...@gmail.com <christofore...@gmail.com>:
>>
>> > As you will see at the bottom of this code snippet, i've commented out
>> > where the problem is. There are no errors but simply the methods never
>> > execute.
>>
>> Chris, add
>>
>> Thread.abort_on_exception = true
>>
>> before starting your code to see more clearly what's going on.
>> Remember that Thread.new immediately starts the thread's code, so in
>> your case the code runs before the assignment to the @callers array.
>>
>> BTW: if you want to access the current thread you have to use Thread.current.
>>
>> Regards,
>> Pit if
>
> I assumed thats what was going on but just wanted a second opinion.
> Thanks for the help. But why then if I call self.time_to_die ( bad
> name for method i know) why does that not execute?
It executes and throws but you do not see the exception because
Thread.abort_on_exception is likely false.
robert
--
remember.guy do |as, often| as.you_can - without end