Loading...

How Do Python Coroutines Work?

606 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Streamed live on Jan 23, 2016

Talk by A Jesse Jiryu Davis

I show an async framework with non-blocking sockets, callbacks, and an event loop. It's efficient, but callbacks make a mess! So I build coroutines from Python generators, and update my little framework to use them instead. With no loss of efficiency, we gain the legibility of synchronous code. Indeed, coroutines are clearer in a way: at each point where a coroutine might be interrupted by another, we explicitly mark it with "yield from".
Once you see them implemented, you're on your way toward a rigorous understanding of what "async" means, and how coroutines work in Python 3.

More info at: https://www.socallinuxexpo.org/scale/...

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...