From: Ben Date: Tue, 17 Jan 2012 21:20:52 +0000 (-0600) Subject: The async.send method wasn't really doing anything useful. It was just calling the... X-Git-Tag: v0.9.2~4^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97be9ee4cd6326bf7551f7a737877ef2e368ef20;p=services%2Fpython-requests.git The async.send method wasn't really doing anything useful. It was just calling the r.send() method of the Request object 'r'. It took an optional kwarg pools, and assigned it to r._pools which isn't used by anything. This situation was eaither broken or not fully implemented yet. I modified async.map to call r.send rather than send(r) and then modified async.send to actually make use of the pool that it is passed. --- diff --git a/requests/async.py b/requests/async.py index 36f6c5a..53aa841 100644 --- a/requests/async.py +++ b/requests/async.py @@ -52,7 +52,7 @@ def send(r, pool=None): and can hence limit concurrency.""" if pool != None: - print pool.full() + return pool.spawn(r.send) return gevent.spawn(r.send)