summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/util.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-07-08 23:03:00 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-07-08 23:03:00 (GMT)
commit71a28a91744b5cf6f881769300818232750de6d2 (patch)
tree812d08c39479a8a291c9f0d5a949589af4c07e39 /Lib/multiprocessing/util.py
parent370092071b34da3ed1c2301857e12158794fbe10 (diff)
downloadcpython-71a28a91744b5cf6f881769300818232750de6d2.zip
cpython-71a28a91744b5cf6f881769300818232750de6d2.tar.gz
cpython-71a28a91744b5cf6f881769300818232750de6d2.tar.bz2
Rebind locally the globals which can be looked up at shutdown
(to avoid the warnings seen on a buildbot)
Diffstat (limited to 'Lib/multiprocessing/util.py')
-rw-r--r--Lib/multiprocessing/util.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/multiprocessing/util.py b/Lib/multiprocessing/util.py
index b59ac9f..c487180 100644
--- a/Lib/multiprocessing/util.py
+++ b/Lib/multiprocessing/util.py
@@ -188,7 +188,11 @@ class Finalize(object):
_finalizer_registry[self._key] = self
- def __call__(self, wr=None):
+ def __call__(self, wr=None,
+ # Need to bind these locally because the globals can have
+ # been cleared at shutdown
+ _finalizer_registry=_finalizer_registry,
+ sub_debug=sub_debug):
'''
Run the callback unless it has already been called or cancelled
'''