Commit 6f3b58ec authored by Stefan Behnel's avatar Stefan Behnel

avoid multiprocessing overhead when only cythonizing one module

parent ba625742
...@@ -792,6 +792,8 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo ...@@ -792,6 +792,8 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
if not os.path.exists(options.cache): if not os.path.exists(options.cache):
os.makedirs(options.cache) os.makedirs(options.cache)
to_compile.sort() to_compile.sort()
if len(to_compile) <= 1:
nthreads = 0
if nthreads: if nthreads:
# Requires multiprocessing (or Python >= 2.6) # Requires multiprocessing (or Python >= 2.6)
try: try:
......
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