import multiprocessing as mp
def square(x):
return x**2
if __name__ == '__main__':
pool = mp.Pool(4)
results=pool.map(square,range(1,20))
I'm trying to use multiprocessing using python
for tutorial, I copied above code and run it, but it doesn't terminate
What is the problem?
I use python 3.8.5 on Windows