From 99b6e3594078da14161000ee7eec3985468ee82e Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Fri, 25 Nov 2011 07:45:12 +0530 Subject: [PATCH] Allow generators or any iterators for async.map --- requests/async.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/requests/async.py b/requests/async.py index 8bafb1e..c91025f 100644 --- a/requests/async.py +++ b/requests/async.py @@ -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) -- 2.34.1