-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PYBIND11_SIMPLE_GIL_MANAGEMENT
option (cmake, C++ define)
#4216
Merged
+433
−60
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
75acc11
Add option to force the use of the PYPY GIL scoped acquire/release lo…
SeeChange-CI 1cd4cff
Apply suggestions from code review
henryiii b855af2
Update CMakeLists.txt
henryiii fb233f0
docs: update upgrade guide
henryiii 7c4f8fe
Update docs/upgrade.rst
henryiii 6f7317e
All bells & whistles.
cf1bb86
Add Reminder to common.h, so that we will not forget to purge `!WITH_…
8885e79
New sentence instead of semicolon.
f2538ba
Temporarily pull in snapshot of PR #4246
52629ac
Add `test_release_acquire`
4062387
Add more unit tests for nested gil locking
SeeChange-CI 31b3868
Add test_report_builtins_internals_keys
87e50b0
Very minor enhancement: sort list only after filtering.
fe7470d
Revert change in docs/upgrade.rst
897c9dd
Add test_multi_acquire_release_cross_module, while also forcing uniqu…
620cc70
Hopefully fix apparently new ICC error.
a8ac941
clang-tidy fixes
e25bcd9
Workaround for PYPY WIN exitcode None
1e72313
Revert "Temporarily pull in snapshot of PR #4246"
af1d9ee
Another workaround for PYPY WIN exitcode None
83c099d
Clean up how the tests are run "run in process" Part 1: uniformity
ee8353e
Clean up how the tests are run "run in process" Part 2: use `@pytest.…
5019457
Skip some tests `#if defined(THREAD_SANITIZER)` (tested with TSAN usi…
ab45337
Run all tests again but ignore ThreadSanitizer exitcode 66 (this is l…
857ee1a
bug fix: missing common.h include before using `PYBIND11_SIMPLE_GIL_M…
10b0334
if process.exitcode is None: assert t_delta > 9.9
ea8b132
More sophisiticated `_run_in_process()` implementation, clearly repor…
4c19a9a
Wrap m.intentional_deadlock in a Python function, for `ForkingPickler…
2c5f864
Add link to potential solution for WOULD-BE-NICE-TO-HAVE feature.
19513d4
Add `SKIP_IF_DEADLOCK = True` option, to not pollute the CI results w…
5ce396e
Add COPY-PASTE-THIS: gdb ... command (to be used for debugging the de…
8c9bce0
style: pre-commit fixes
pre-commit-ci[bot] 065ac50
Do better than automatic pre-commit fixes.
6984cab
Add `PYBIND11_SIMPLE_GIL_MANAGEMENT` to `pytest_report_header()` (so …
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nit: Do we follow this style anywhere else? I find it quite confusing, because it reads like this is the "WITH_THREAD" block, while it's actually the not WITH_THREAD block. For things like this, they should be enforced (such as the comment at the end of a namespace is forced). I don't think it can, because this style can't be expanded to an elif chain.
Also this block goes away when we drop 3.6, right? We should be able to deduce that when we remove the WITH_THREAD.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the wild I see negations, or not. I don't think it's consistent in the world, and that's clearly confusing.
What do we want to follow here?
I decided even with that ambiguity, having the markers is more helpful than not, because the first scope (non-simple) is quite large.
Ultimately, something like this would be best:
Although if we push it there I'd want to find better names than simple and non-simple.
Please let me know what you prefer:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with it as is (that's why it's a nit, can be ignored). This code will simplify later when we remove 3.6. I'm just not a fan of commented out code, it can be confusing (on the else, it's ambiguous), and it can easy become wrong if things get moved around (no test for it matching up). I'd rather use indentation and then visually check, just like I already have to do if I don't trust comments like this (which I don't), and everyone has to do on most other if/else blocks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be wasteful. You'd be processing and compiling both sides, while you'd only use one. Unless we added
gil_scoped_acquire_simple
/gil_scoped_acquire_notsimple
to our API, which I don't think we want to do, then it's much harder to remove the complex one later.