mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
12 lines
204 B
Python
12 lines
204 B
Python
from __future__ import with_statement
|
|
import multiprocessing
|
|
|
|
|
|
def f(x):
|
|
return x*x # breakpoint
|
|
|
|
|
|
if __name__ == '__main__':
|
|
with multiprocessing.Pool() as p:
|
|
print(p.map(f, [1, 2, 3]))
|