Sign in
android
/
platform
/
tools
/
idea
/
2250e7e055295bee73366d360d15ea0270573ef6
/
.
/
python
/
testData
/
debug
/
test_multiprocess.py
blob: 5fc6be4625d86398dbbc9bdb31c2973ca34bd535 [
file
] [
log
] [
blame
]
from
concurrent
.
futures
import
ProcessPoolExecutor
def
my_foo
(
arg_
):
return
arg_
def
main
():
arg
=
[
'Result:OK'
]
with
ProcessPoolExecutor
(
1
)
as
exec
:
result
=
exec
.
map
(
my_foo
,
arg
)
for
i
in
result
:
print
(
i
)
if
__name__
==
'__main__'
:
main
()