[issue6692] asyncore kqueue support

Giampaolo Rodola' report at bugs.python.org
Mon Apr 19 21:55:13 CEST 2010


Giampaolo Rodola' <g.rodola at gmail.com> added the comment:

The patch in attachment implements support for epoll() and kqueue() by adding a new "poller" argument to asyncore.loop().

However, I had a chat with Jean Paul Calderone today which pointed out how useless this is. =)
The problem is basically how asyncore.loop() is implemented.
Being impossible to let loop() function know when a file descriptor gets added or removed from the socket map we are forced to iterate over all existing fds on every loop which nullifies the benefits offered by epoll() and kqueue() syscalls.

As of right now I can't think of a solution to this problem which doesn't imply a change to the current asyncore API.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6692>
_______________________________________


More information about the Python-bugs-list mailing list