Actions
Feature #10176
openDocument how to perform net/http calls in parallel
Status:
Open
Assignee:
-
Target version:
-
Description
The typhoeus gem is a big source of Ruby VM crashes. It seems to me that the only reason people use this gem is because net/http doesn't document how to GET many URLs in parallel. I'd like to see a simple code example in the net/http RDoc which show people how to fetch many URLs in parallel using net/http. For example, this might be one way but I don't know if it's the recommended or most efficient way:
urls = %w(www.yahoo.com www.google.com www.bing.com)
results = urls.map { |url| Thread.new { Net::HTTP.get(url, '/') } }.map(&:join)
No data to display
Actions
Like0