[Python-ideas] Tulip patches
Geert Jansen
geertj at gmail.com
Fri Dec 21 15:31:33 CET 2012
Hi,
[if this is not the right forum to post patches for tulip, please
redirect me to the correct one. There doesn't appear to be a mailing
list for tulip at the moment. And this list is where most/all of the
discussion is taking place.]
Please find attached 4 patches:
0001-run-fd-callbacks.patch
This patch will run callbacks for readers and writers in the same loop
iteration as when the fd got ready. Copying from my previous email,
this is to support the following idiom:
# handle_read() sets the "ready" flag
loop.add_reader(fd, handle_read)
while not ready:
loop.run_once()
The patch currently dispatches callbacks twice in each iteration, once
before blocking and once after. I tried to dispatch only once after
blocking, but this made the SSL transport test hang. The reason is
that the create_transport task is scheduled with call_soon(), and only
when the task first runs, a file descriptor is added. So unless you
dispatch before blocking, this task will never get started.
0002-call-every-iteration.patch
This adds a call_every_iteration() method to the event loop. This
callback runs *before* blocking.
0003-fix-typo.patch
0004-remove-wrong-comments.patch
Two trivial patches.
Regards,
Geert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-run-fd-callbacks.patch
Type: application/octet-stream
Size: 2088 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121221/69b01974/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-call-every-iteration.patch
Type: application/octet-stream
Size: 2699 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121221/69b01974/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-fix-typo.patch
Type: application/octet-stream
Size: 640 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121221/69b01974/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-remove-wrong-comments.patch
Type: application/octet-stream
Size: 856 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121221/69b01974/attachment-0003.obj>
More information about the Python-ideas
mailing list