]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport gvanrossum's checkin of revision 1.20:
authorMichael W. Hudson <mwh@python.net>
Fri, 4 Jan 2002 12:29:45 +0000 (12:29 +0000)
committerMichael W. Hudson <mwh@python.net>
Fri, 4 Jan 2002 12:29:45 +0000 (12:29 +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.

2.1.2 and 2.2.1 Bugfix candidate!

(has this gone into 2.1.2 yet?)

Lib/threading.py

index fbf40cd04c6732103060987ae72aaac3f5625a57..6543cc36cbe73ef2bee617264b75c0166368053d 100644 (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()