[issue35608] python3 multiprocessing queue deadlock when use thread and process at same time

Tim Peters report at bugs.python.org
Sat Dec 29 11:00:39 EST 2018


Tim Peters <tim at python.org> added the comment:

Antoine, alas, it's subtler than that.  The worker process (process_func()) puts _another_ `StopIteration` on the input queue in its `finally` clause.  So the first worker process to finish adds back a sentinel for the next worker to see, and so on.  At the end, one StopIteration is left on input_queue (added by the last worker to finish).

Everything shuts down cleanly for me on 64-bit Win10 Py 3.7.2 no matter what input I tried, so I can't reproduce.

The OP really needs to identify _where_ it's hanging, and when (after all input has been read?  somewhere "random in the middle"? ...), and if at all possible supply an input on which it does hang.

The OP should also try 3.7.2.

----------
nosy: +tim.peters

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35608>
_______________________________________


More information about the Python-bugs-list mailing list