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

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

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.