Commit 1a1a6eeb authored by Stefan Behnel's avatar Stefan Behnel

immediately close MP build pool after use

parent f2fd034c
...@@ -788,7 +788,10 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo ...@@ -788,7 +788,10 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
print("multiprocessing required for parallel cythonization") print("multiprocessing required for parallel cythonization")
nthreads = 0 nthreads = 0
else: else:
pool.map(cythonize_one_helper, to_compile) try:
pool.map(cythonize_one_helper, to_compile)
finally:
pool.close()
if not nthreads: if not nthreads:
for args in to_compile: for args in to_compile:
cythonize_one(*args[1:]) cythonize_one(*args[1:])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment