From: Anthony Baxter Date: Thu, 10 Jan 2002 09:54:01 +0000 (+0000) Subject: Backport gvanrossum's checkin of revision 1.20: X-Git-Tag: v2.1.2c1~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a82adf926ba0160c5913e50850bc2394d269150a;p=thirdparty%2FPython%2Fcpython.git Backport gvanrossum's checkin of revision 1.20: 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. --- diff --git a/Lib/threading.py b/Lib/threading.py index c5e65d92677f..692411035066 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -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()