]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
atexit.py - mutate list of functions in thread-safe way
authorMoshe Zadka <moshez@math.huji.ac.il>
Sat, 31 Mar 2001 09:45:04 +0000 (09:45 +0000)
committerMoshe Zadka <moshez@math.huji.ac.il>
Sat, 31 Mar 2001 09:45:04 +0000 (09:45 +0000)
Lib/atexit.py
Misc/NEWS

index a31163094f8e4e17e0847f2cd863e854155296c0..66e4404f551be478a1da8101e11237fea5b55107 100644 (file)
@@ -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
index 8eda0210c06dc6d1ff60f444416756afcfd75292..e701670f6cc0168b0e00d891c0270afd7c22b3ae 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -94,6 +94,8 @@ http://sourceforge.net/tracker/index.php?func=detail&aid=<id>&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?
 =========================