mirror of https://github.com/python/cpython.git
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.
This commit is contained in:
parent
a1a8da8bf5
commit
77657e40fa
|
@ -188,13 +188,7 @@ def _start_thread(self):
|
||||||
debug('... done self._thread.start()')
|
debug('... done self._thread.start()')
|
||||||
|
|
||||||
# On process exit we will wait for data to be flushed to pipe.
|
# On process exit we will wait for data to be flushed to pipe.
|
||||||
#
|
if not self._joincancelled:
|
||||||
# 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:
|
|
||||||
self._jointhread = Finalize(
|
self._jointhread = Finalize(
|
||||||
self._thread, Queue._finalize_join,
|
self._thread, Queue._finalize_join,
|
||||||
[weakref.ref(self._thread)],
|
[weakref.ref(self._thread)],
|
||||||
|
|
|
@ -40,6 +40,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #4106: Fix occasional exceptions printed out by multiprocessing on
|
||||||
|
interpreter shutdown.
|
||||||
|
|
||||||
- Issue #11657: Fix sending file descriptors over 255 over a multiprocessing
|
- Issue #11657: Fix sending file descriptors over 255 over a multiprocessing
|
||||||
Pipe.
|
Pipe.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue