Async I/O for Python 3
dropbox.com
Async I/O for Python 3
1–10 of 92 posts
Re: Async I/O for Python 3
#2Re: Async I/O for Python 3
#3Re: Async I/O for Python 3
#4Re: Async I/O for Python 3
#5If Guido still worked at Google would this have been hosted on google docs and I would have been able to read it without Office?
Re: Async I/O for Python 3
#6Still puzzled why the primary inspiration for this is Twisted, which has some really ugly APIs.
Re: Async I/O for Python 3
#7If Guido still worked at Google would this have been hosted on google docs and I would have been able to read it without Office?
Re: Async I/O for Python 3
#8Re: Async I/O for Python 3
#9Does anyone have a link to the video? Or for various PyCon 2013 videos in general?
Re: Async I/O for Python 3
#10Yes it has nice features such can replace the reactor/hub thing. Has futures/promises/deferreds. That has all been done before in Twisted. Yields are cute and there was monocle, I wouldn't say it exactly took off : https://github.com/saucelabs/monocle
Twisted has inlineCallbacks that use yields as well. Just import Twisted into stdlib then and use that.
I am surprised that gevent was dismissed. Ok, there is also eventlet, if someone doesn't like gevent. Monkey patching is scary? Is it really _that_ scary? Most sane and portable IO code probably runs on that today. Why? Because there is no need to create a parallel world of libraries. Write a test does it pass? Does it handle your use case? I'll take not knowing if my green threads switch tasks and add another green thread lock, instead of doubling my code size with yields, callbacks and futures.
Let's talk about Twisted (sorry couldn't resist WAT video reference). I remember for years searching for parallel libraries to parse exotic protocols. Regular Python library is there, but no, can't use that, sorry. Gotta go find or write one that returns Deferreds. You add a single Twisted module in your code, good luck! -- it ripples all the way to the top through your API and you are doomed being locked into the Twisted world forever.
When gevent and eventlet came around it was like a breath of fresh air. This is what sane concurrent IO looks like in Python:
http://eventlet.net/doc/examples.html
My fear is that many will just say fuck it, I'll just use Go/Rust/Erlang for IO bound concurrent problems.
It is nice having a benevolent dictator, except when he goes a little crazy, then dictatorship doesn't sounds so much fun anymore.