- Fix Issue #1703448: A joined thread could show up in the

threading.enumerate() list after the join() for a brief period until
  it actually exited.
This commit is contained in:
Gregory P. Smith 2008-01-22 01:20:42 +00:00
parent 64c5677de4
commit 95cd5c0b72
3 changed files with 30 additions and 5 deletions

View file

@ -515,11 +515,14 @@ class Thread(_Verbose):
if __debug__:
self._note("%s.__bootstrap(): normal return", self)
finally:
self.__stop()
try:
self.__delete()
except:
pass
with _active_limbo_lock:
self.__stop()
try:
# We don't call self.__delete() because it also
# grabs _active_limbo_lock.
del _active[_get_ident()]
except:
pass
def __stop(self):
with self.__block: