[Python-ideas] The async API of the future

Richard Oudkerk shibturn at gmail.com
Sun Nov 4 18:32:52 CET 2012

On 04/11/12 15:26, Guido van Rossum wrote:
> I've been thinking about this too. I can see the scalability issues with
> select(),  but frankly, poll(), epoll(), and even kqueue() all look
> similar in O() behavior to me from an API perspective. I guess the
> differences are in the kernel -- but is it a constant factor or an
> unfortunate O(N) or worse? To what extent would this be overwhelmed by
> overhead in the Python code we're writing around it? How bad is it to
> add extra register()/unregister() (or (modify()) calls per read operation?

At the C level poll() and epoll() have quite different APIs.  Each time 
you use poll() you have to pass an array which describes the events you 
are interested in.  That is not necessary with epoll().

The python API hides the difference.


More information about the Python-ideas mailing list