Skip to content
Myr

Merge pull request #217 from thedaniel/async-doc

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Clarify documentation around async.map and Request.send

authored by Kenneth Reitz · committed by Kenneth Reitz · parents c5ed4c9, eddf525 · Browse files · 1 file+4 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−3 removed

  • other:+4 added−3 removed

1 file+4 added−3 removed

modified:docs/user/advanced.rst+4 added-3 removed
67 unmodified lines
68 ]6970 rs = [async.get(u) for u in urls]7172Now we have a list of ``Request`` objects, ready to be sent. We could73send them one at a time with ``Request.send()``, but that would take a while.74Instead, we'll send them all at the same time with ``async.map()``::72Now we have a list of ``Request`` objects, ready to be sent. We could send them73one at a time with ``Request.send()``, but that would take a while. Instead,74we'll send them all at the same time with ``async.map()``. Using ``async.map()``75will also guarantee execution of the ``response`` hook, described below. ::7677 >>> async.map(rs)78 [<Response [200]>, <Response [200]>, <Response [200]>, <Response [200]>]79
93 unmodified lines