blinkx
  • A Curious Course on Coroutines and Concurrency (Part 002)

  • 00:32:05
  • Blip
    • Browse

A Curious Course on Coroutines and Concurrency (Part 002)

[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.

Blip | April 15, 2009Watch more videos from Blip

Tags:. .multitasking. .concurrent. .concurrency. .vaguely. .python