cpython: d316315a8781 (original) (raw)
Mercurial > cpython
changeset 72063:d316315a8781 2.7
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. [#4106]
Antoine Pitrou solipsis@pitrou.net | |
---|---|
date | Wed, 24 Aug 2011 22:41:05 +0200 |
parents | d4d9a3e71897 |
children | b1af3aeba523 |
files | Lib/multiprocessing/queues.py Misc/NEWS |
diffstat | 2 files changed, 4 insertions(+), 7 deletions(-)[+] [-] Lib/multiprocessing/queues.py 8 Misc/NEWS 3 |
line wrap: on
line diff
--- 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.
#[](#l1.7)
# However, if this process created the queue then all[](#l1.8)
# processes which use the queue will be descendants of this[](#l1.9)
# process. Therefore waiting for the queue to be flushed[](#l1.10)
# is pointless once all the child processes have been joined.[](#l1.11)
created_by_this_process = (self._opid == os.getpid())[](#l1.12)
if not self._joincancelled and not created_by_this_process:[](#l1.13)
if not self._joincancelled:[](#l1.14) self._jointhread = Finalize([](#l1.15) self._thread, Queue._finalize_join,[](#l1.16) [weakref.ref(self._thread)],[](#l1.17)
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -40,6 +40,9 @@ Core and Builtins Library ------- +- Issue #4106: Fix occasional exceptions printed out by multiprocessing on