Loading
#openttdcoop - Paste
Archives
Trending
Docs
Login
Pool-basic-test
Wrap
Raw
Revise
from
multiprocessing
import
Pool
import
multiprocessing
def
cube
(
x
)
:
return
x**
3
pool
=
multiprocessing.
Pool
(
processes
=
1
)
results
=
[
pool.
apply
(
cube
,
args
=
(
x
,
)
)
for
x
in
range
(
1
,
7
)
]
print
(
results
)
Comments