-
Notifications
You must be signed in to change notification settings - Fork 14
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
[#217,#218] Remove Python 2 support code, implement proper thread state handling (main) #219
Conversation
just noticing the std::lock_guard is pulled out of the try/catch, in case that's important.
|
There's a reason for that. I'll probably end up moving it back in, but I need to tweak some exception handling |
Since I am currently testing with 4-3-stable, progress may be followed in #220 instead of in this PR. |
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.
#'d |
Is this identical to the PR for 4-3-stable? |
Yes |
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.