Thread.__bootstrap(): ignore exceptions in the self.__delete() call in

the finally clause.  An exception here could happen when a daemon
thread exits after the threading module has already been trashed by
the import finalization, and there's not much of a point in trying to
insist doing the cleanup in that stage.

This should fix SF bug ##497111: active_limbo_lock error at program
exit.

2.1.2 and 2.2.1 Bugfix candidate!
This commit is contained in:
Guido van Rossum 2001-12-28 22:07:09 +00:00
parent 2764a3a50e
commit f21b2aafa9
1 changed files with 4 additions and 1 deletions

View File

@ -421,7 +421,10 @@ class Thread(_Verbose):
self._note("%s.__bootstrap(): normal return", self)
finally:
self.__stop()
self.__delete()
try:
self.__delete()
except:
pass
def __stop(self):
self.__block.acquire()