Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
cf7d2e6f
Unverified
Commit
cf7d2e6f
authored
Mar 16, 2023
by
Ralf W. Grosse-Kunstleve
Committed by
GitHub
Mar 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change `always_forkserver_on_unix()` to `use_multiprocessing_forkserver_on_linux()` (#4577)
parent
c4c15d4b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
tests/conftest.py
+4
-5
No files found.
tests/conftest.py
View file @
cf7d2e6f
...
...
@@ -8,8 +8,8 @@ import contextlib
import
difflib
import
gc
import
multiprocessing
import
os
import
re
import
sys
import
textwrap
import
traceback
...
...
@@ -25,8 +25,9 @@ except Exception:
@pytest.fixture
(
scope
=
"session"
,
autouse
=
True
)
def
always_forkserver_on_unix
():
if
os
.
name
==
"nt"
:
def
use_multiprocessing_forkserver_on_linux
():
if
sys
.
platform
!=
"linux"
:
# The default on Windows and macOS is "spawn": If it's not broken, don't fix it.
return
# Full background: https://github.com/pybind/pybind11/issues/4105#issuecomment-1301004592
...
...
@@ -34,8 +35,6 @@ def always_forkserver_on_unix():
# It is actually a well-known pitfall, unfortunately without guard rails.
# "forkserver" is more performant than "spawn" (~9s vs ~13s for tests/test_gil_scoped.py,
# visit the issuecomment link above for details).
# Windows does not have fork() and the associated pitfall, therefore it is best left
# running with defaults.
multiprocessing
.
set_start_method
(
"forkserver"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment