I was running some Python code and realized when I instantiate Pool with only one process, for instance:
from multiprocessing.pool import Pool
from time import sleep
def f(i):
print(i)
sleep(10)
with Pool(1) as p:
p.map(f, [i for i in range(100)])
Actually five processes are currently running. I've also noticed a pattern going on: if I instantiate Pool with 1, 2,3,... processes the number of processes launched by Python are 5,6,7,... I'm curious: Does Pool use three process for management?