... continued

Continues the discussion on pools and describes the map API.

We'll cover the following...

In the previous section we discussed the simplest API offered by the Pool class. However, it offers a much more powerful map() API. The name may ring a bell with readers who have background in big data or have worked with the famous map-reduce programming paradigm.

map reduce

Very briefly, the idea behind map-reduce is dividing a very large problem into smaller chunks that can be worked upon independently from each other. The chunks are distributed among different processing units and as the results for each chunk become ready, they are sorted and passed through a user-provided reducer function which defines the logic for combining all the results. Many real-world problems can be modeled on the lines of the map-reduce programming paradigm and be solved much faster.

map ( )

The Pool class's map API breaks up the problem size into ...