On Tue, Jul 01, 2003 at 01:12:50AM +0900, kingsley / icecode.org wrote:
> Hi
> 
> When I do this:
> 
> thr3 = Thread.new() do
> loop do
> puts \"thread\"
> end
> end
> 
> The loop only lasts for about 5 seconds - printing out \'thread\' about
> 100 times

To answer the question in the subject: yes, threading does work properly :-)

When the main thread of your program reaches the end, all other threads are
killed too.

Add the following line at the end:

   thr3.join

(which means "wait for thr3 to finish", which of course it never does).

Regards,

Brian.