This is a problem I've had only within jupyter notebook, not with running through python3 normally (even though using the same conda environment).
If I run the following code on my windows machine via jupyter notebook:
from multiprocessing import Pool
def f(x):
return x
pool = Pool(4)
for res in pool.map(f,range(10)):
print(res)
I do not see any values returned. I see the multiple python processes get spawned but there is 0 cpu load on them and nothing is returned.
If I run this as a python script (within the same conda environment) I get the proper response.
Is there a way to use multiprocessing.pool in jupyter/windows?
Thank you!