Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 23, 2013
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
A proposal for "rebooted" Python asynchronous I/O support
Posted Jan 3, 2013 18:12 UTC (Thu) by intgr (subscriber, #39733)
You are kindly invited to collaborate and improve it.
Posted Jan 4, 2013 11:23 UTC (Fri) by smurf (subscriber, #17840)
Debugging a maze of "yield from"s and/or explicitly registered callbacks is a *major* PITA. Been there, done that, given up, and re-implemented a couple of ten thousand lines with gevent instead of Twisted.
Fortunately, implementing a Twisted reactor on top of gevent has already been done, so the migration can be done in steps and is rather painless.
I am fairly sure that the same thing will be done for this PEP, once it's moderately final.
Posted Jan 6, 2013 2:35 UTC (Sun) by tack (subscriber, #12542)
This is very different from the callback world of Twisted. The code reads fairly linearly like it would with gevent, except that your exit/entry points are explicit rather than implicit.
Having coded with both approaches (that is, explicit yields vs. greenlet-style implicitness) I prefer to be explicit. I rather like the visual cue that signals where my function will suspend and resume and I find this improves debuggability rather than hinders it. IMO, yielding gives you a nice bit of async magic while not violating the principle of least astonishment.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds