mirror of
https://github.com/autistic-symposium/web3-starter-py.git
synced 2025-05-17 22:20:22 -04:00
10 lines
158 B
Python
10 lines
158 B
Python
#!/usr/bin/env python3
|
|
|
|
from multiprocessing import Pool
|
|
|
|
def f(x):
|
|
return x*x
|
|
|
|
if __name__ == '__main__':
|
|
p = Pool(5)
|
|
print(p.map(f, [1, 2, 3]))
|