I am working on multiprocessing and trying to replicate the code given in the below link:
My system is hanging in both Spyder and Jupyter as shown following. What could be the reason?
Following is the code exactly copied and running. But it is just hanging.
from multiprocessing import Pool
def f(x):
return x*x
if __name__ == '__main__':
with Pool(3) as p:
print(p.map(f, [1, 2, 3]))