Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

The multiprocessing Module

In this lesson, you’ll see why you’d want to take this approach. Because you wrote your code in a functional programming style, you can parallelize it fairly easily. There’s a parallel map construct that you can use. That way, you can run your processing steps in parellel.

You’ll import the multiprocessing module because it has all the building blocks you’ll need to run this operation in parallel. Later, you’ll learn how to use the multiprocessing.Pool class and its parallel map implementation, which makes parallelizing most Python code that’s written in a functional style a breeze.

Become a Member to join the conversation.