[issue6692] asyncore kqueue support

Giampaolo Rodola' report at bugs.python.org
Thu Dec 10 09:23:53 CET 2009


Giampaolo Rodola' <billiejoex at users.sourceforge.net> added the comment:

I have a patch for adding epoll() support which is almost ready
(asyncore supports poll(), not epoll()), it's just a matter of writing
tests. 

kqueue() shouldn't be too difficult to implement considering that we can
take Twisted as example.

...But aside from the implementation details I'd say there's a crucial
problem with the current API:

asyncore.loop([timeout[, use_poll[, map[, count]]]])

The "use_poll" argument should be deprecated in favor of something else,
maybe a "poller" which accepts a callable, like this:


>>> asyncore.loop(poller=asyncore.select_poller)
>>> asyncore.loop(poller=asyncore.epoll_poller)
>>> asyncore.loop(poller=asyncore.kqueue_poller)

----------

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


More information about the Python-bugs-list mailing list