]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-104341: Call _PyEval_ReleaseLock() with NULL When Finalizing the Current...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 1 Jun 2023 22:50:28 +0000 (15:50 -0700)
committerGitHub <noreply@github.com>
Thu, 1 Jun 2023 22:50:28 +0000 (22:50 +0000)
commitd2be5c73ed520fb9d82a395f001eb9001711ed8f
treeb25d3a5a6d33c6d311bab307c205b905f3aae6a2
parentc38ceb032d59d6c8f2006ab9a347d7e207f9f84e
[3.12] gh-104341: Call _PyEval_ReleaseLock() with NULL When Finalizing the Current Thread (gh-105109) (gh-105209)

This avoids the problematic race in drop_gil() by skipping the FORCE_SWITCHING code there for finalizing threads.

(The idea for this approach came out of discussions with @markshannon.)
(cherry picked from commit 3698fda)

Co-authored-by: Eric Snow ericsnowcurrently@gmail.com
Include/internal/pycore_ceval.h
Python/ceval_gil.c
Python/pylifecycle.c
Python/pystate.c