[issue24484] multiprocessing cleanup occasionally throws exception
Jorge Herskovic
report at bugs.python.org
Thu Jun 25 17:06:21 CEST 2015
Jorge Herskovic added the comment:
Ok, I *think* I tracked it down to Connections getting cleaned up in a non-orderly fashion, sometimes while _run_finalizers is executing. The following patch to lib/python3.4/multiprocessing/connection.py cures the problem on my machine.
@@ -124,10 +124,10 @@
self._handle = handle
self._readable = readable
self._writable = writable
-
+ self._shutdown = util.Finalize(self, self._finalizer)
# XXX should we use util.Finalize instead of a __del__?
-
- def __del__(self):
+
+ def _finalizer(self):
if self._handle is not None:
self._close()
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24484>
_______________________________________
More information about the Python-bugs-list
mailing list