| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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.
|
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.
There was a problem hiding this comment.
LGTM, but need to fix that pesky MSVC failure.
Sorry, something went wrong.
|
|
||
| static inline void | ||
| _PyRuntimeState_SetFinalizing(_PyRuntimeState *runtime, PyThreadState *tstate) { | ||
| return _Py_atomic_store_relaxed(&runtime->_finalizing, (uintptr_t)tstate); |
There was a problem hiding this comment.
I think the return is confusing MSVC (see CI failures).
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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