]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-59956: Clarify Runtime State Status Expectations (gh-101308)
authorEric Snow <ericsnowcurrently@gmail.com>
Mon, 30 Jan 2023 19:07:48 +0000 (12:07 -0700)
committerGitHub <noreply@github.com>
Mon, 30 Jan 2023 19:07:48 +0000 (12:07 -0700)
commite11fc032a75d067d2167a21037722a770b9dfb51
treea9e1b00b661f5ccc131f62f161d2963737bcf03c
parentea232716d3de1675478db3a302629ba43194c967
gh-59956:  Clarify Runtime State Status Expectations (gh-101308)

A PyThreadState can be in one of many states in its lifecycle, represented by some status value.  Those statuses haven't been particularly clear, so we're addressing that here.  Specifically:

* made the distinct lifecycle statuses clear on PyThreadState
* identified expectations of how various lifecycle-related functions relate to status
* noted the various places where those expectations don't match the actual behavior

At some point we'll need to address the mismatches.

(This change also includes some cleanup.)

https://github.com/python/cpython/issues/59956
Include/cpython/pystate.h
Include/internal/pycore_pystate.h
Modules/_threadmodule.c
Python/ceval_gil.c
Python/pylifecycle.c
Python/pystate.c