]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport gvanrossum's checkin of revision 1.20:
authorAnthony Baxter <anthonybaxter@gmail.com>
Thu, 10 Jan 2002 09:54:01 +0000 (09:54 +0000)
committerAnthony Baxter <anthonybaxter@gmail.com>
Thu, 10 Jan 2002 09:54:01 +0000 (09:54 +0000)
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.

Lib/threading.py

index c5e65d92677f964c93b1a4bf38dce40523af3c10..69241103506642f8c465a95757ae2dcb0e4450f7 100644 (file)
@@ -391,7 +391,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()