I want to be able to do something like this in Ruby:
(new[]{"http://google.com", "http://facebook.com", "http://microsoft.com", "http://twitter.com", "http://stackoverflow.com"})
.AsParallel()
.Select(q => WebRequest.Create(q).GetResponse())
This also should preserve order of elements and use deferred execution.
Are there any options available?
The Ruby curb gem, which is a wrapper around the
curllibrary, has a “multi” mode that can fetch a number of URLs in parallel.From the example: