Merge pull request #217 from thedaniel/async-doc

Clarify documentation around async.map and Request.send
This commit is contained in:
Kenneth Reitz
2011-10-21 07:24:11 -07:00
+4 -3
View File
@@ -69,9 +69,10 @@ We can build a list of ``Request`` objects easily::
rs = [async.get(u) for u in urls]
Now we have a list of ``Request`` objects, ready to be sent. We could
send them one at a time with ``Request.send()``, but that would take a while.
Instead, we'll send them all at the same time with ``async.map()``::
Now we have a list of ``Request`` objects, ready to be sent. We could send them
one at a time with ``Request.send()``, but that would take a while. Instead,
we'll send them all at the same time with ``async.map()``. Using ``async.map()``
will also guarantee execution of the ``response`` hook, described below. ::
>>> async.map(rs)
[<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]