Spaces:
Paused
Paused
| from multiprocessing import Pool, freeze_support, cpu_count | |
| def f(x, y): | |
| return x*x + y | |
| if __name__ == '__main__': | |
| with Pool(5) as p: | |
| print(p.starmap(f, [[1, 1], [2, 1],[3, 1]])) | |
| print(cpu_count()) |