summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-08-24 20:41:05 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-08-24 20:41:05 (GMT)
commit77657e40fa5f43fe6f7ffb6e32da4613dba657e1 (patch)
tree28dbbc142f6fb222057210ef042ce916eeb16c54 /Lib/multiprocessing
parenta1a8da8bf5d6d27936702f9241c8726efd6b4b42 (diff)
downloadcpython-77657e40fa5f43fe6f7ffb6e32da4613dba657e1.zip
cpython-77657e40fa5f43fe6f7ffb6e32da4613dba657e1.tar.gz
cpython-77657e40fa5f43fe6f7ffb6e32da4613dba657e1.tar.bz2
Issue #4106: Fix occasional exceptions printed out by multiprocessing on interpreter shutdown.
This bug doesn't seem to exist on 3.2, where daemon threads are killed before Py_Finalize() is entered.
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r--Lib/multiprocessing/queues.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py
index 8584408..b7eecef 100644
--- a/Lib/multiprocessing/queues.py
+++ b/Lib/multiprocessing/queues.py
@@ -188,13 +188,7 @@ class Queue(object):
debug('... done self._thread.start()')
# On process exit we will wait for data to be flushed to pipe.
- #
- # However, if this process created the queue then all
- # processes which use the queue will be descendants of this
- # process. Therefore waiting for the queue to be flushed
- # is pointless once all the child processes have been joined.
- created_by_this_process = (self._opid == os.getpid())
- if not self._joincancelled and not created_by_this_process:
+ if not self._joincancelled:
self._jointhread = Finalize(
self._thread, Queue._finalize_join,
[weakref.ref(self._thread)],