Commit 79178e71 by jbarlow83 Committed by GitHub

fix(setup_helpers): try import multiprocessing.synchronize too (#3043)

parent 19d99a87
...@@ -410,7 +410,9 @@ class ParallelCompile(object): ...@@ -410,7 +410,9 @@ class ParallelCompile(object):
compiler._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) compiler._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
try: try:
import multiprocessing # Importing .synchronize checks for platforms that have some multiprocessing
# capabilities but lack semaphores, such as AWS Lambda and Android Termux.
import multiprocessing.synchronize
from multiprocessing.pool import ThreadPool from multiprocessing.pool import ThreadPool
except ImportError: except ImportError:
threads = 1 threads = 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