In the python docs for the multiprocessing module the very first example is about the Pool command.
from multiprocessing import Pool
def f(x):
return x*x
if __name__ == '__main__':
with Pool(5) as p:
print(p.map(f, [1, 2, 3]))
This script is used to demonstrate how the Pool method can be used to run the same function in parallel for a series of possible arguments.
They do not, however explain or provide the arguments to the Pool method, which in this case equals 5.
What is that argument? Why is it 5 in this case? Does it have something to do with the number of allowed processes at a given time?
Thanks