Skip to content

Commit bbdbd32

Browse files
committed
Use multiprocessing start_method "forkserver"
Alternative to PR #4305
1 parent 0176632 commit bbdbd32

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

tests/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import contextlib
88
import difflib
99
import gc
10+
import multiprocessing
11+
import os
1012
import re
1113
import textwrap
1214

@@ -15,6 +17,9 @@
1517
# Early diagnostic for failed imports
1618
import pybind11_tests
1719

20+
if os.name != "nt":
21+
multiprocessing.set_start_method("forkserver")
22+
1823
_long_marker = re.compile(r"([0-9])L")
1924
_hexadecimal = re.compile(r"0x[0-9a-fA-F]+")
2025

tests/test_gil_scoped.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _intentional_deadlock():
144144

145145

146146
ALL_BASIC_TESTS_PLUS_INTENTIONAL_DEADLOCK = ALL_BASIC_TESTS + (_intentional_deadlock,)
147-
SKIP_IF_DEADLOCK = True # See PR #4216
147+
SKIP_IF_DEADLOCK = False # See PR #4216
148148

149149

150150
def _run_in_process(target, *args, **kwargs):

0 commit comments

Comments
 (0)