I'm trying to learn the multiprocessing module of Python (3). I've encountered the following really simple example while googling, but for me it just speeds up the processors (I can see them on task manager/hear the fan), but nothing happens whatsoever, it just gets stuck. (yes, the computer should be fast enough...)
I've been looking for syntax examples, to figure out what I may be doing wrong, without success. Does anyone know what I may be missing on the code/syntax to produce any results? Tx!
import multiprocessing as mp
def cube(x):
return x**3
pool = mp.Pool(processes=4)
results = pool.map(cube, range(1,7))
print(results)