Tulip: Async I/O for Python 3
Why Stack Overflow recommends it
Stack Overflow users link it as the original design explanation from Python's creator when answering questions about asyncio, event loops, coroutines and tasks.
Recommended by 1 people across 1 different months, 2013 to 2018.
What it is
Guido van Rossum presents Tulip, the prototype that became Python's asyncio, at a 2013 talk hosted by Twitter University. He covers the design of the event loop, coroutines using yield from, futures and tasks, and why it replaces the asyncore module.
What people said
Recommends James Mills · 2013-12 · Stack Overflow · on “Python 3.4 async mechanisms”
Python 3.4 is attempting to bring to the standard library a standard reference implemenation of an event loop. I believe Guido has been developed this and it's called Tulip. See: [LINK] Video PyCon Talk: [this video]
Cites Gabriel · 2013-10 · Stack Overflow · on “Tulip/asyncIO: why not all calls be async and specify when things should be synchronous?”
I went to the SF Python meetup when Guido talked [this video] about Tulip, the future asyncIO library for asynchronous operations in Python. The take away is that if you want something to be run asynchronously you can use the "yield from" + expression and a couple of decorators to specify that the call to what comes after yield from should be executed asynchronously. The nice thing about it is that you can read the statements in that function normally (as if it was synchronous) and it will behave as if it was synchronous with respect to the execution of that function (return values and error/exception propagation and handling). My question is: why not have the opposite behavior, namely, have all
Cites crizCraig · 2018-09 · Stack Overflow · on “Difference between coroutine and future/task in Python 3.5?”
From the BDFL [2013] [this video] Tasks It's a coroutine wrapped in a Future class Task is a subclass of class Future So it works with await too! How does it differ from a bare coroutine? It can make progress without waiting for it As long as you wait for something else, i.e. await [something_else] With this in mind, ensure_future makes sense as a name for creating a Task since the Future's result will be computed whether or not you await it (as long as you await something). This allows the event loop to complete your Task while you're waiting on other things. Note that in Python 3.7 create_task is the preferred way ensure a future [LINK] . Note: I changed "yield from" in Guido's slides to "await