Hey!

Welcome to Blip, home of the best original web series! When you’re done watching this episode, checkout some of our top shows or learn more about us!

×

PyCon US Videos - 2009, 2010, 2011

A Curious Course on Coroutines and Concurrency (Part 002)

Other Sharing Options

×
Embed
The embed code has been copied to your clipboard
Share
About this episode
[VIDEO HAS ISSUES: bit of clipping start to finish.] If you are a programmer who cares about Python and concurrency, then you should also care about...
[VIDEO HAS ISSUES: bit of clipping start to finish.] If you are a programmer who cares about Python and concurrency, then you should also care about Python coroutines. Although they were first introduced in Python 2.5, coroutines remain one of Python's most overlooked features---often vaguely described as a curious "extension" of generator functions with little insight as to how they might be applied to real-world problems. This tutorial examines coroutines in a more practical light by showing how they are actually a very elegant way to implement a processing "task." Using this task abstraction, it is possible to use coroutines to implement processing pipelines, event handling systems, and programs based on cooperative multitasking. Moreover, if you define tasks using coroutines, they can be easily incorporated into more traditional concurrent programs that utilize threads or message passing. Less
32:06 Learning
Discover the best in original web series.© 2012 Blip Networks, Inc. All Rights Reserved.