diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-01-19 23:04:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-19 23:04:14 (GMT) |
commit | 6036c3e856f033bf13e929536e7bf127fdd921c9 (patch) | |
tree | 2e0f92c60f4d860826e6e224e6c073e220d76386 /Include/cpython | |
parent | 8a2d4f4e8eea86352de37d2ce28117e13b3dfaed (diff) | |
download | cpython-6036c3e856f033bf13e929536e7bf127fdd921c9.zip cpython-6036c3e856f033bf13e929536e7bf127fdd921c9.tar.gz cpython-6036c3e856f033bf13e929536e7bf127fdd921c9.tar.bz2 |
gh-59956: Clarify GILState-related Code (gh-101161)
The objective of this change is to help make the GILState-related code easier to understand. This mostly involves moving code around and some semantically equivalent refactors. However, there are a also a small number of slight changes in structure and behavior:
* tstate_current is moved out of _PyRuntimeState.gilstate
* autoTSSkey is moved out of _PyRuntimeState.gilstate
* autoTSSkey is initialized earlier
* autoTSSkey is re-initialized (after fork) earlier
https://github.com/python/cpython/issues/59956
Diffstat (limited to 'Include/cpython')
-rw-r--r-- | Include/cpython/pystate.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h index 0117c23..81944a5 100644 --- a/Include/cpython/pystate.h +++ b/Include/cpython/pystate.h @@ -114,11 +114,7 @@ struct _ts { PyThreadState *next; PyInterpreterState *interp; - /* Has been initialized to a safe state. - - In order to be effective, this must be set to 0 during or right - after allocation. */ - int _initialized; + int _status; int py_recursion_remaining; int py_recursion_limit; |