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) ?

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