diff options
Diffstat (limited to 'python/testData/debug/test_multiprocess.py')
-rw-r--r-- | python/testData/debug/test_multiprocess.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/python/testData/debug/test_multiprocess.py b/python/testData/debug/test_multiprocess.py new file mode 100644 index 000000000000..5fc6be4625d8 --- /dev/null +++ b/python/testData/debug/test_multiprocess.py @@ -0,0 +1,13 @@ +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()
\ No newline at end of file |