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.

This commit is contained in:
Ben
2012-01-17 15:20:52 -06:00
parent c658b363e3
commit 97be9ee4cd
+1 -1
View File
@@ -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)