{{ message }}
bpo-39877: _PyRuntimeState.finalizing becomes atomic#18816
Merged
vstinner merged 2 commits intoMar 6, 2020
Merged
Conversation
Convert _PyRuntimeState.finalizing field to an atomic variable: * Rename it to _finalizing * Change its type to _Py_atomic_address * Add _PyRuntimeState_GetFinalizing() and _PyRuntimeState_SetFinalizing() functions * Remove _Py_CURRENTLY_FINALIZING() function: replace it with testing directly _PyRuntimeState_GetFinalizing() value Convert _PyRuntimeState_GetThreadState() to static inline function.
Member
Author
|
This PR prepares the code for PR #18811 which does no longer protect _PyRuntimeState.finalizing with the GIL. See discussion: #18811 (comment) |
Sorry, something went wrong.
pitrou
approved these changes
Mar 6, 2020
pitrou
left a comment
Member
There was a problem hiding this comment.
LGTM, but need to fix that pesky MSVC failure.
Sorry, something went wrong.
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
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.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.
Convert _PyRuntimeState.finalizing field to an atomic variable:
functions
directly _PyRuntimeState_GetFinalizing() value
Convert _PyRuntimeState_GetThreadState() to static inline function.
https://bugs.python.org/issue39877