On Sat, Nov 3, 2012 at 3:06 PM, Guido van Rossum email@example.com wrote:
FWIW, I've been studying other event loops. It's interesting to see the similarities (and differences) between e.g. the tulip eventloop, pyftpd's ioloop, Tornado's IOLoop, and 0MQ's IOLoop. The latter two look very similar, except that 0MQ makes the poller pluggable, but generally there are lots of similarities between the structure of all four. Twisted, as usual, stands apart. :-)
Pyzmq's IOLoop is actually a fork/monkey-patch of Tornado's, and they have the same pluggable-poller implementation (In the master branch of Tornado it's been moved to the PollIOLoop subclass).
On Sat, Nov 3, 2012 at 2:20 PM, Richard Oudkerk firstname.lastname@example.org wrote:
On 02/11/2012 11:59pm, Guido van Rossum wrote:
Working code or it didn't happen. (And it should scale too.)
I have some (mostly) working code which replaces tulip's "pollster"
with "proactor" classes for select(), poll(), epoll() and IOCP. See
The IOCP proactor does not support ssl (or ipv6) so main.py does not
in downloading from xkcd.com using ssl. Using the other proactors it
The basic interface for the proactor looks like
class Proactor: def recv(self, sock, n): ... def send(self, sock, buf): ... def connect(self, sock, address): ... def accept(self, sock): ... def poll(self, timeout=None): ... def pollable(self): ...
recv(), send(), connect() and accept() initiate io operations and return futures. poll() returns a list of ready futures. pollable() returns
if there are any outstanding operations registered with the proactor.
use a pattern like
f = proactor.recv(sock, 100) if not f.done(): yield from scheduling.block_future(f) res = f.result()
Python-ideas mailing list Pythonemail@example.com http://mail.python.org/mailman/listinfo/python-ideas
-- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-ideas mailing list Pythonfirstname.lastname@example.org http://mail.python.org/mailman/listinfo/python-ideas