]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-36854: Clear the current thread later (GH-17279)
authorVictor Stinner <vstinner@python.org>
Wed, 20 Nov 2019 10:17:17 +0000 (11:17 +0100)
committerGitHub <noreply@github.com>
Wed, 20 Nov 2019 10:17:17 +0000 (11:17 +0100)
commit9da7430675ceaeae5abeb9c9f7cd552b71b3a93a
treef78a3703f3d8ca26714e1f20cc08df9102f60eab
parentd51a363a4379385fdfe9c09a56324631465ede29
bpo-36854: Clear the current thread later (GH-17279)

Clear the current thread later in the Python finalization.

* The PyInterpreterState_Delete() function is now responsible
  to call PyThreadState_Swap(NULL).
* The tstate_delete_common() function is now responsible to clear the
  "autoTSSKey" thread local storage and it only clears it once the
  thread state is fully cleared. It allows to still get the current
  thread from TSS in tstate_delete_common().
Modules/_xxsubinterpretersmodule.c
Python/pylifecycle.c
Python/pystate.c