[Python-ideas] [Python-Dev] Python needs a standard asynchronous return object

Glyph Lefkowitz glyph at twistedmatrix.com
Thu Sep 16 00:13:23 CEST 2010


On Sep 15, 2010, at 6:09 PM, exarkun at twistedmatrix.com wrote:

> 
> Glyph meant this:
> 
>   def parallel(N):
>       ds = DeferredSemaphore(N)
>       l = []
>       for x in ...:
>           l.append(ds.run(do_something_async, it))
>       return gatherResults(l).addCallback(set)
> 
> Jean-Paul

I knew it should have looked shorter and sweeter.  Thanks.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20100915/687db6c5/attachment.html>


More information about the Python-ideas mailing list