From: Toki Toki Date: 2008-07-26T05:18:27+09:00 Subject: Re: Simultaneously URL call, is it possible? Bret Pettichord wrote: > On Fri, Jul 25, 2008 at 1:25 PM, Toki Toki wrote: > >> >> > I think this needs a call to Thread#join after all the the threads have > been > created. Otherwise the script will exit before the threads have > executed. > > Bret Something like this: require 'net/http' require 'uri' threads = [] 10.times do threads << Thread.new {Net::HTTP.get_response(URI.parse('http://www.google.com/'))} end threads.each {|x| x.join} But if the original script exit before the threads have executed why I see a request and not 0 request? -- Posted via http://www.ruby-forum.com/.