You could check out http://github.com/pauldix/typhoeus

It allows you to create parallel HTTP requests pretty easily.

On May 13, 2010, at 3:37 AM, Daniel DeLorme wrote:

> Does anyone know how to do the following, but without threads, purely =
with asynchronous IO?
>=20
> website =3D Thread.new{ Net::HTTP.get(URI.parse(url)) }
> template =3D compute_lots_of_stuff()
> puts template.sub("<content goes here>", website.value)
>=20
> I'm not sure I understand EventMachine, but it doesn't seem like this =
code fits with the "event loop" model. Besides, I don't want to react to =
every chunk of data that comes it; I just want the result at the end.
>=20
> Thanks.
>=20


--
Zach Moazeni
http://simplechatter.com