mirror of
https://github.com/python/cpython.git
synced 2025-08-26 11:45:20 +00:00
tbpo-36402: Fix threading.Thread._stop() (GH-14047)
Remove the _tstate_lock from _shutdown_locks, don't remove None.
This commit is contained in:
parent
b4b814b398
commit
6f75c87375
2 changed files with 25 additions and 1 deletions
|
@ -965,7 +965,7 @@ class Thread:
|
|||
self._tstate_lock = None
|
||||
if not self.daemon:
|
||||
with _shutdown_locks_lock:
|
||||
_shutdown_locks.discard(self._tstate_lock)
|
||||
_shutdown_locks.discard(lock)
|
||||
|
||||
def _delete(self):
|
||||
"Remove current thread from the dict of currently running threads."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue