diff options
author | Guido van Rossum <guido@python.org> | 2001-12-28 22:07:09 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-12-28 22:07:09 +0000 |
commit | 91d59e44a3a27d2e916dbf8e723e6f52aa396d67 (patch) | |
tree | 0001532cb116f4d44c36cdead719d282a49f9e13 /Lib/threading.py | |
parent | 840f7798683c4d3b41972c14b2333c4ea66fdbc0 (diff) | |
download | cpython-91d59e44a3a27d2e916dbf8e723e6f52aa396d67.tar.gz |
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!
Diffstat (limited to 'Lib/threading.py')
-rw-r--r-- | Lib/threading.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/threading.py b/Lib/threading.py index fbf40cd04c..6543cc36cb 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -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() |