Ticket #4645 enhancement closed duplicate
Make twisted.internet.epollreactor use Python 2.6's built-in select.epoll if available
|Reported by:||pts||Owned by:|
|Component:||core||Keywords:||epoll, built-in, reactor, Python 2.6|
|Author:||Péter Szabó||Launchpad Bug:|
This patch makes Twisted able to use the built-in select.epoll class available in Python 2.6 and later, so Twisted gets fast polling via epoll even on systems where C extensions (like Twisted's _epoll.c) cannot be compiled.
This patch achieves its goal by adding methods to epoll class defined _epoll.pyx which are compatible with the methods of select.epoll, then making epollreactor.py use these methods, and finally making epollreactor.py import select.epoll if twisted.python._epoll is not available.