]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-104341: Add a Separate "Running" Lock for Each Thread (gh-104754)
authorEric Snow <ericsnowcurrently@gmail.com>
Tue, 23 May 2023 20:29:30 +0000 (14:29 -0600)
committerGitHub <noreply@github.com>
Tue, 23 May 2023 20:29:30 +0000 (14:29 -0600)
commit097b7830cd67f039ff36ba4fa285d82d26e25e84
treeaf283738ec5257f6b66283bbd4fdcba077a6f10a
parent08b4eb83aadcbdb389b5970b51cac9be95146c2a
gh-104341: Add a Separate "Running" Lock for Each Thread (gh-104754)

Having a separate lock means Thread.join() doesn't need to wait for the thread to be cleaned up first.  It can wait for the thread's Python target to finish running.  This gives us some flexibility in how we clean up threads.

(This is a minor cleanup as part of a fix for gh-104341.)
Lib/test/test_threading.py
Lib/threading.py