question about epoll in tornado

6 views
Skip to first unread message

chl

unread,
Sep 11, 2009, 10:46:46 PM9/11/09
to Tornado Web Server
Hi all -

Apologies if this is something I should know. I'm new to Python, but
am currently making Debian packages of Tornado for use at Crashcorp.

What I'm curious about is that the docs mention the use of epoll for
fast non-blocking polling, which makes sense. And I see an epoll.c
file in the source that seems to provide simple python wrappers around
the normal epoll functions. However, I don't see that this file is
actually compiled and linked to anything when I run

python setup.py build

or do the normal Debian / Ubuntu packaging stuff.

So, bluntly, I'm wondering if I'm missing something here about what
that file is there for. If I am (or if I'm not) I'd love to know.
Thanks!

Best,

- Chris Lea

chl

unread,
Sep 11, 2009, 10:57:47 PM9/11/09
to Tornado Web Server
Possibly answering my own question?

http://scotdoyle.com/python-epoll-howto.html

I'm building this on Ubuntu Jaunty which has Python 2.6 installed,
which apparently has epoll built in. Would I be correct in assuming if
I were on a system that had Python 2.5 installed, the included epoll.c
file in the source would be used to get the native bindings needed?

Starting to make sense, but I'm still curious. Enjoying the Python
stuff quite a bit so far.

Best,

- chl

Shelby Ramsey

unread,
Sep 12, 2009, 1:12:10 AM9/12/09
to python-...@googlegroups.com
The short answer:
  -- if you start tornado and epoll support is not available it will throw a warning (i.e. running python less than 2.6)
  -- if this is the case you can use python 2.6+ or compile epoll


Reply all
Reply to author
Forward
0 new messages