[Python-ideas] asyncore: included batteries don't fit

Guido van Rossum guido at python.org
Sun Oct 7 06:35:42 CEST 2012

On Saturday, October 6, 2012, Devin Jeanpierre wrote:

> On Sun, Oct 7, 2012 at 12:05 AM, Guido van Rossum <guido at python.org>
> wrote:
> > However I figured that if we define the interfaces well enough, it
> > might be possible to use (a superficially modified version of)
> > Twisted's reactors instead of the standard ones, and, orthogonally,
> > Twisted's deferred's could be wrapped in the standard Futures (or the
> > other way around?) when used with a non-Twisted reactor. Which would
> > hopefully open the door for migrating some of their more useful
> > protocol parsers into the stdlib.
> I thought futures were meant for thread and process pools? The
> blocking methods make them a bad fit for an asynchronous networking
> toolset.

The specific Future implementation in the py3k stdlib uses threads and is
indeed meant for thread and process pools.

But the *concept* of futures works fine in event-based systems, see the
link I posted into the NDB sources. I'm not keen on cancellation and
threadpools FWIW.

> The Twisted folks have discussed integrating futures and Twisted (see
> also the reply, which has some corrections):
> http://twistedmatrix.com/pipermail/twisted-python/2011-January/023296.html
> -- Devin

--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121006/bfa459bb/attachment.html>

More information about the Python-ideas mailing list