Martin <martin.schroe...@nerdluecht.de> added the comment:
While I appreciate your suggestion, it does not help me much. The problem that people usually have is that the output is scrambled. That is not the problem I'm dealing with. I'm experiencing a deadlock caused by the print statement which seems like a python bug to me. Furthermore, the problem appears in a library that is supposed to be used by other people and I have no control over their use of IO. The particular behavior seems to be specific to using threading and multiprocessing together: - If I use multiprocessing.dummy (multiprocessing API implemented with threads; so only a single processes are involved), my example works fine. - If I use a process instead of a thread to fill the queue (filler = multiprocessing.Process(...); so no threads are involved), my example also works fine. - Only if I have two threads in the main process and additional processes, the example fails. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41539> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com