[Stackless] easy epoll on linux with stacklesssocket

Phoenix Sol phoenix at burninglabs.com
Sun Apr 6 01:06:44 CEST 2008


Hello Stacklessistas,

In all my flailing to get stacklesssocket to use libevent, I had failed to
realize that there is a very easy way to get stacklesssocket to use epoll on
linux:
    http://pypi.python.org/pypi/python-epoll/1.0

I know lots of you are using Windows, and / or Twisted, but on the odd
chance there is a fellow Linux user out there who wants greater speed and
efficiency with stacklesssocket, here you go:
________________________________________________________________________________________________

1. easy_install python-epoll

2. modify stacklesssocket:
    a. monkeypatch select with epoll:
            import epoll; sys.modules['select'] = epoll

    b. change the call to asyncore.poll to asyncore.poll2 (this will call
'poll' instead of 'select'; epoll uses this interface)
________________________________________________________________________________________________

Voila; bon-appetit.

-- 
Phoenix Sol
541-646-8612
130 'A' Street,
Suite 6
Ashland, Oregon
97520
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20080405/cec6235e/attachment.htm>


More information about the Stackless mailing list