diff Lib/threading.py @ 21589:d04eb8d664e2 legacy-trunk

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!
author Guido van Rossum <guido@python.org>
date Fri, 28 Dec 2001 22:07:09 +0000
parents 0f9df563b65d
children 4e9cc26e03fd
line wrap: on
line diff
--- a/Lib/threading.py	Fri Dec 28 21:39:03 2001 +0000
+++ b/Lib/threading.py	Fri Dec 28 22:07:09 2001 +0000
@@ -421,7 +421,10 @@
                     self._note("%s.__bootstrap(): normal return", self)
         finally:
             self.__stop()
-            self.__delete()
+            try:
+                self.__delete()
+            except:
+                pass
 
     def __stop(self):
         self.__block.acquire()