GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-104341: Call _PyEval_ReleaseLock() with NULL When Finalizing the Current Thread by ericsnowcurrently · Pull Request #105109 · python/cpython Conversation
|
|
|
||
| void | ||
| _PyEval_ReleaseLock(PyThreadState *tstate) | ||
| _PyEval_ReleaseLock(PyInterpreterState *interp, PyThreadState *tstate) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The other key part of this change is here, where we pass in the interpreter separately from the thread state, which allows tstate to be NULL.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| static void | ||
| drop_gil(struct _ceval_state *ceval, PyThreadState *tstate) | ||
| { | ||
| /* We shouldn't be using a thread state that isn't viable any more. */ |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This comment is cryptic here. It doesn't say why it's here nor in which situation the "non-viable thread state" occurs.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I've clarified the comment.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I think we're good to go: no objections from me. I never assume I can have full confidence about modifications to this code, but CI and buildbots and ultimately beta2 testing should reveal more if anything else lurks... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks you! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @ericsnowcurrently for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry @ericsnowcurrently, I had trouble checking out the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @ericsnowcurrently for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
… the Current Thread (pythongh-105109) This avoids the problematic race in drop_gil() by skipping the FORCE_SWITCHING code there for finalizing threads. (The idea for this approach came out of discussions with @markshannon.) (cherry picked from commit 3698fda) Co-authored-by: Eric Snow <[email protected]>
|
GH-105209 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…g the Current Thread (gh-105109) (gh-105209) This avoids the problematic race in drop_gil() by skipping the FORCE_SWITCHING code there for finalizing threads. (The idea for this approach came out of discussions with @markshannon.) (cherry picked from commit 3698fda) Co-authored-by: Eric Snow [email protected]
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.