mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +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)
|
||||
|
||||
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
|
||||
except ImportError:
|
||||
threads = 1
|
||||
|
Loading…
Reference in New Issue
Block a user