micropython-lib/unix-ffi/multiprocessing/test_pool.py

10 wiersze
114 B
Python

from multiprocessing import Pool
def f(x):
return x * x
pool = Pool(4)
assert pool.apply(f, (10,)) == 100