multiprocessing

John Melesky (PDX Python, June 2010)

In the 2.6 standard library

Otherwise, available from PyPI (>=2.4)

A note

multiprocessing is a huge library, and deserving of a full-fledged talk (or several), rather than a module-of-the-month.

The manager functionality, for example, is elaborate and useful.

A note

multiprocessing is a huge library, and deserving of a full-fledged talk (or several), rather than a module-of-the-month.

The manager functionality, for example, is elaborate and useful (as far as i can tell. i haven't used it. this is still just a motm talk).

A different note

multiprocessing is complex, and occasionally slightly hackish. Expect the following:

Pre-multiprocessing

Pre-multiprocessing

Process

sample process code

Process

Pool

sample pool code

Pool

Queue

(nonworking) sample queue code

Queue

See Queue.Queue

Pipe

(semiworking) sample pipe code

Connection

Stuff i'm not covering

Final example

A web scraper with Process and Queue