How to Create a multiprocessing.Pool() Object
In this lesson, you’ll create a
multiprocesing.Pool object. This is an interface that you can use to run your
transform() function on your input data in parallel, spread out over multiple CPU cores. This
Pool instance has a
map() function, so you can
transform() function over scientists.
Now, when you run your program, you’ll see that you get the same result, but you get it a lot faster. This happened because you did your processing in two batches. In the next lesson, you’ll keep working with
Comments & Discussion
Become a Member to join the conversation.