Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#4645 enhancement closed duplicate (duplicate)

Make twisted.internet.epollreactor use Python 2.6's built-in select.epoll if available

Reported by: Péter Szabó Owned by:
Priority: normal Milestone:
Component: core Keywords: epoll, built-in, reactor, Python 2.6
Cc: Branch:
Author: Péter Szabó

Description

Get the patch from here: http://code.google.com/p/pts-mini-gpl/source/browse/trunk/patches/pts-twisted-10.1.0-builtin-epoll.svn.diff

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.

Attachments (1)

pts-twisted-10.1.0-builtin-epoll.svn.diff (89.0 KB) - added by Péter Szabó 7 years ago.
A local copy of pts-twisted-10.1.0-builtin-epoll.svn.diff

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by Péter Szabó

A local copy of pts-twisted-10.1.0-builtin-epoll.svn.diff

comment:1 Changed 7 years ago by Jean-Paul Calderone

Milestone: regular-releases
Resolution: duplicate
Status: newclosed

Duplicate of #3114

comment:2 Changed 7 years ago by Itamar Turner-Trauring

pts, could you indicate on #3114 if you'd be willing to license that patch under something under than GPL, which the original page indicates is the license?

comment:3 in reply to:  2 Changed 7 years ago by Glyph

Replying to itamar:

pts, could you indicate on #3114 if you'd be willing to license that patch under something under than GPL, which the original page indicates is the license?

... and by "something other than the GPL", itamar means "the MIT license", i.e. the contents of Twisted's LICENSE file.

comment:4 Changed 7 years ago by Péter Szabó

Sure, feel free to use http://code.google.com/p/pts-mini-gpl/source/browse/trunk/patches/pts-twisted-10.1.0-builtin-epoll.svn.diff under "the MIT license", i.e. the contents of Twisted's LICENSE file.

comment:5 Changed 6 years ago by <automation>

Owner: Glyph deleted
Note: See TracTickets for help on using tickets.