From: Moshe Zadka Date: Sat, 31 Mar 2001 09:45:04 +0000 (+0000) Subject: atexit.py - mutate list of functions in thread-safe way X-Git-Tag: v2.0.1c1~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2112200478b6369957f21435ec4f9402b88ad41d;p=thirdparty%2FPython%2Fcpython.git atexit.py - mutate list of functions in thread-safe way --- diff --git a/Lib/atexit.py b/Lib/atexit.py index a31163094f8e..66e4404f551b 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 8eda0210c06d..e701670f6cc0 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? =========================