4 ms·
I'm not sure from what perspective you were looking to compare asyncio to green threads (performance, readability, etc.) but there is an interesting blog post [
by nchammas 11y ago
I'm not sure from what perspective you were looking to compare asyncio to green threads (performance, readability, etc.) but there is an interesting blog post [0] by the lead architect of Twisted about the fundamental difference in programming model between explicit yielding (e.g. asyncio) and implicit yielding (e.g. green threads, regular threads). It may give you some answers.
PEP 492, from what I understood, is more about streamlining the syntax, and the major differences between asyncio (pre this proposed syntax) and green threads in terms of programming model still apply.
[0] https://glyph.twistedmatrix.com/2014/02/unyielding.html https://glyph.twistedmatrix.com/2014/02/unyielding.html
- nas 11y agoGlyph is a smart guy and has been doing async code for a very long time (at least in computing terms). It would be wise to consider his arguments. I've done a project making heavy use of Python 3's asyncio feature. It is much nicer than doing the same job with threads or call-backs, in my experience. I'd welcome nicer syntax but the current functionality seems to work well. I can't understand why someone would design a language in 2009 (Node.js) that uses callbacks. For simple programs it works but it doesn't take long to end up with an unmaintainable mess (in my experience).
- deleted 11y ago[deleted]
- pekk 11y agoWhy is it wise not to consider opposing arguments? Because people who disagree with Glyph are not "smart guys"?
- nas 11y agoQuite the logic you have going on there. Certainly you should also consider other arguments.
- sylvinus 11y agoWith all the respect I have for Glyph, he's the least objective person to talk about this, having so much invested in one side of the argument.
- harlowja 11y agoIMHO the following are much more useful to read over: * https://review.openstack.org/#/c/153298/ https://review.openstack.org/#/c/153298/ * http://techspot.zzzeek.org/2015/02/15/asynchronous-python-and-databases/ http://techspot.zzzeek.org/2015/02/15/asynchronous-python-an... * http://lists.openstack.org/pipermail/openstack-dev/2014-February/thread.html#26237 http://lists.openstack.org/pipermail/openstack-dev/2014-Febr... And others...