From 2112200478b6369957f21435ec4f9402b88ad41d Mon Sep 17 00:00:00 2001 From: Moshe Zadka Date: Sat, 31 Mar 2001 09:45:04 +0000 Subject: atexit.py - mutate list of functions in thread-safe way --- Lib/atexit.py | 3 +-- Misc/NEWS | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/atexit.py b/Lib/atexit.py index a311630..66e4404 100644 --- a/Lib/atexit.py +++ b/Lib/atexit.py @@ -14,9 +14,8 @@ def _run_exitfuncs(): """ while _exithandlers: - func, targs, kargs = _exithandlers[-1] + func, targs, kargs = _exithandlers.pop() apply(func, targs, kargs) - _exithandlers.remove(_exithandlers[-1]) def register(func, *targs, **kargs): """register a function to be executed upon normal program termination diff --git a/Misc/NEWS b/Misc/NEWS index 8eda021..e701670 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -94,6 +94,8 @@ http://sourceforge.net/tracker/index.php?func=detail&aid=&group_id=5470&atid - #123924 - httplib.py - Windows - using OpenSSL, problem with socket +- atexit.py - mutate list of functions in thread-safe way + What's New in Python 2.0? ========================= -- cgit v0.12