i've been trying to test this simple piece of code on my machine on Jupyter and the cell just runs indefinitely without outputing anything. Is there some kind of bug or something? I use the exact same piece of code for a pandas process with pool.map and everything just works fine, but can't figure out what is happening here.
import multiprocessing as mp
pool1 = mp.Pool(processes = 3)
def sumP(a, b):
return (a * b) / (a - b + 1)
f1, f2, f3 = 24, 31, 45
new_rows2 = pool1.starmap(sumP, [(f1, f2), (f2, f3), (f1, f3)])
print(new_rows2)
And the cell just keeps running. Doesn't matter if i use pool1.map or pool1.starmap.
Do you guys suggest any other way of parallelizing this process?