From: Vincent Fourmond Date: 2006-08-28T03:16:14+09:00 Subject: Re: Ruby threads and the system call Hello ! > > 10.times { |i| > x = Thread.new(i) { > 10.times { |j| > fork { > system "echo #{i}, #{j} >> temp.txt" > } > Process::wait > } > } > x.join Great thanks, I had completely forgotten to call join for the threads... By the way, the version with fork is around 4 times faster on my box: ruby test_threads_system.rb > /dev/null 0.04s user 0.10s system 21% cpu 0.639 total ruby test_threads_system_fork.rb > /dev/null 0.00s user 0.04s system 25% cpu 0.171 total Cheers and thanks !! Vince