Paul wrote:
> I have many threads that I leave running, doing things in the
> background. I end up writing a lot of code like the following - is
> there a way to make a thread run, avoiding the while(1) ?

If you need another way to make a loop, here it is:

loop do
end

If you want to avoid a loop altogether, then I do not understand what 
you mean. After all a "thread" is a "thread of execution" -- execution 
stops, the thread stops.

> 
> Thanks
> 
> Paul
> 
> a = Thread.new(){ 
>    aa = 0
>    while(1)
>        puts "a thread: #{aa}"
>        aa=aa+1
>    end
> }
> 
> b = Thread.new(){ 
>    bb = 0
>    while(1)
>        puts "b thread: #{bb}"
>        bb=bb+2
>    end
> }
> 
> a.join
>