We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29cea64 commit 74bbc04Copy full SHA for 74bbc04
tests/conftest.py
@@ -18,7 +18,13 @@
18
import pybind11_tests
19
20
if os.name != "nt":
21
- # https://github.com/pybind/pybind11/issues/4105#issuecomment-1301004592
+ # Full background: https://github.com/pybind/pybind11/issues/4105#issuecomment-1301004592
22
+ # In a nutshell: fork() after starting threads == flakiness in the form of deadlocks.
23
+ # It is actually a well-known pitfall, unfortunately without guard rails.
24
+ # "forkserver" is more performant than "spawn" (~9s vs ~13s for tests/test_gil_scoped.py,
25
+ # visit the issuecomment link above for details).
26
+ # Windows does not have fork() and the associated pitfall, therefore it is best left
27
+ # running with defaults.
28
multiprocessing.set_start_method("forkserver")
29
30
_long_marker = re.compile(r"([0-9])L")
0 commit comments