from multiprocessing import Pool def f(x): sleep(1) print(1) sleep(1) print(2) return x*x if __name__ == '__main__': plist = [1, 2, 3, 4, 5, 6] with Pool(6) as p: print(p.map(f, plist)) # map(self, func, iterable, chunksize)