concurrent.futures is here

A session at EuroPython 2012

  • Andrew Dalke

Thursday 5th July, 2012

9:00am to 9:45am (CET)

The future is here! Or rather, concurrent.futures became part of the Python standard library with 3.2. This style of asynchronous programming, also known as promises, has been around for decades but is only recently becoming popular in a number of languages and libraries.

My presentation is meant for a Python programmer who knows nothing about futures. I’ll structure it around processing web server logs, and show several ways to Python code can make more effective use of a multi-core machine. In some cases the multi-threaded executor is good enough, but in others the right solution is the multi-process executor. Because of the unified API, it’s a one line change to switch from one to the other.

It isn’t hard to write your own executor for different compute models. I’ll show that by developing a new one which works on top of the PiCloud API. At the end I’ll describe some of the more experimental work I’m doing to use promises in a dependency graph, where certain computed properties are dependent on others.

Even though concurrent.futures came in 3.2, Python 2.x users can use the API through Alex Grönholm’s ‘futures’ backport.

About the speaker

This person is speaking at this event.
Andrew Dalke

Andrew Dalke Scientific AB

Andrew has been using Python full time since 1998. He develops software for computational chemistry and biology and teaches Python programming to research scientists. Andrew is a self-employed consultant based in Gothenburg, Sweden.

Next session in Spaghetti

9:45am Language alone won't pay your bills by Alan Franzoni

Coverage of this session

Sign in to add slides, notes or videos to this session

EuroPython 2012

Italy Italy, Florence

2nd8th July 2012

Tell your friends!

When

Time 9:00am9:45am CET

Date Thu 5th July 2012

Where

Spaghetti, Grand Hotel Mediterraneo

Short URL

lanyrd.com/srzqq

Official event site

ep2012.europython.eu

View the schedule

Share

Topics

See something wrong?

Report an issue with this session