From: dblack@... Date: 2003-01-22T00:56:14+09:00 Subject: Re: Threading problem ... Hi -- On Tue, 21 Jan 2003, Lars M. wrote: > Thanks so much! > > Fixed code follows. > > #################################### > > def countdown > 10.downto 0 do |number| > puts number > sleep 1 > end > end > > def newThread(code) > Thread.start {code.call} > end > > newThread(proc {countdown}) > newThread(proc {countdown}) > > sleep 10 If your Proc just wraps a method call, you can just call the method directly: Thread.new { countdown } Thread.new { countdown } David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav