[#217,#218] Remove Python 2 support code, implement proper thread state handling (main)#219
Merged
alanking merged 2 commits intoirods:mainfrom Aug 22, 2024
Merged
Conversation
Member
|
just noticing the std::lock_guard is pulled out of the try/catch, in case that's important.
|
Member
Author
There's a reason for that. I'll probably end up moving it back in, but I need to tweak some exception handling |
Member
Author
|
Since I am currently testing with 4-3-stable, progress may be followed in #220 instead of in this PR. |
Member
8d17a51 to
f61c636
Compare
With Python 3.12, we started seeing crashes during certain multithreaded operations. It turns out that changes to the GIL in 3.12 exposed that we are not handling Python thread state properly. This commit fixes this. A new namespace python_state has been added to main.cpp for holding onto some Python state information, and a new struct python_thread_state_scope has also been added for managing Python thread state. This will be improved upon in the future.
Member
Author
|
#'d |
Contributor
|
Is this identical to the PR for 4-3-stable? |
Member
Author
|
Yes |
korydraughn
approved these changes
Aug 21, 2024
alanking
approved these changes
Aug 22, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Addresses #217
Addresses #218 (WIP)
Not tested yet, could probably be improved.
Since I am currently testing with 4-3-stable, progress may be followed in #220 instead of in this PR.