From: Bulat Ziganshin Date: 2003-01-24T21:00:05+09:00 Subject: Re: Threading problem ... Hello Lars, Tuesday, January 21, 2003, 5:49:08 PM, you wrote: LM> Thanks so much! LM> Fixed code follows. LM> #################################### LM> def countdown LM> 10.downto 0 do |number| LM> puts number LM> sleep 1 LM> end LM> end LM> def newThread(code) LM> Thread.start {code.call} LM> end LM> newThread(proc {countdown}) LM> newThread(proc {countdown}) LM> sleep 10 ... and even better solution: def countdown 10.downto 0 do |number| puts number sleep 1 end end a=Thread.new {countdown} # curly braces! b=Thread.new {countdown} a.join b.join -- Best regards, Bulat mailto:bulatz@integ.ru