[Python-ideas] The async API of the future

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Oct 20 07:00:00 CEST 2012


Jasper St. Pierre wrote:
> Nope. libX11/XCB keep their own queue of events and do their own
> socket management, so it's not just "poll on this FD, thanks"

So you keep going until the internal buffer is empty.
"Run once" is probably a bit inaccurate; it's really
more like "run until you don't think there's anything
more to do".

> It's clear there's never going to be one event loop solution (as Guido
> already mentioned, there's wars about libuv/libevent/libev that we
> can't possibly resolve), so why pretend like there is?

This discussion seems to have got off track. I'm not
opposed to being able to choose whichever top-level
event loop works the best for your application.

All I set out to say is that a wait-for-ready style
event loop seems more amenable to having other event
loops plugged into it than a wait-for-completion
one.

But maybe that's not a problem if we provide an
IOCP-based event loop that can be plugged into the
wait-for-ready loop of your choice. Is that likely
to be feasible?

-- 
Greg



More information about the Python-ideas mailing list