mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 14:45:12 +00:00
fix(setup_helpers): try import multiprocessing.synchronize too (#3043)
This commit is contained in:
parent
19d99a87fe
commit
79178e713d
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user