Merge pull request #287 from sharat87/patch-2

Allow generators or any iterators for async.map
This commit is contained in:
Kenneth Reitz
2011-11-26 07:09:37 -08:00
+2
View File
@@ -71,6 +71,8 @@ def map(requests, prefetch=True, size=None):
:param size: Specifies the number of requests to make at a time. If None, no throttling occurs.
"""
requests = list(requests)
if size:
pool = Pool(size)
pool.map(send, requests)