bpo-30886: Fix multiprocessing.Queue.join_thread() (#2642) (#2643) · python/cpython@7f3d65d (original) (raw)

Original file line number Diff line number Diff line change
@@ -169,14 +169,7 @@ def _start_thread(self):
169 169 self._thread.start()
170 170 debug('... done self._thread.start()')
171 171
172 -# On process exit we will wait for data to be flushed to pipe.
173 -#
174 -# However, if this process created the queue then all
175 -# processes which use the queue will be descendants of this
176 -# process. Therefore waiting for the queue to be flushed
177 -# is pointless once all the child processes have been joined.
178 -created_by_this_process = (self._opid == os.getpid())
179 -if not self._joincancelled and not created_by_this_process:
172 +if not self._joincancelled:
180 173 self._jointhread = Finalize(
181 174 self._thread, Queue._finalize_join,
182 175 [weakref.ref(self._thread)],