PyCon 2016 in Portland, Or
hills next to breadcrumb illustration

Monday 10:50 a.m.–11:20 a.m.

Thinking In Coroutines

Łukasz Langa

Audience level:
Python Core (language, stdlib, etc.)


The wait for the killer feature of Python 3 is over! Come learn about asyncio and the beauty of event loops, coroutines, futures, executors and the mighty async/await. Practical examples. Bad puns. Pretty pictures. No prior asyncore, Twisted or Node.js experience required.


Running on every production server at Facebook, asyncio is a proven framework that lets us work with concurrent code that is shorter to write, easier to read, more friendly to test and often even faster to run. This talk intends to demystify the core concepts behind asyncio, showing how basic they really are. We will use actual asyncio source code to explain each one, including: * the event loop * a blocking call * a coroutine * a task * a future * thread pool executors and process pool executors * yield from/async/await We will also see how unit testing and debugging works in an asynchronous world.