How Do Python Coroutines Work?

Asynchronous I/O frameworks like Node, Twisted, Tornado, and Python 3.4’s new “asyncio” can efficiently scale past tens of thousands of concurrent connections. But async coding with callbacks is painful and error-prone. Programmers increasingly use coroutines in place of callbacks to get the best of both worlds: efficiency plus a natural and robust coding style. I’ll explain how asyncio’s coroutines work. They are built using Python generators, the “yield from” statement, and the Future and Task classes. You will gain a deep understanding of this miraculous new programming idiom in the Python standard library.
Length: 34:53
Views 2429 Likes: 33
Recorded on 2015-06-23 at Open Source Bridge
Look for other videos at Open Source Bridge.
Tweet this video