Author moi90
Recipients iritkatriel, moi90
Date 2020-08-13.21:35:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1597354536.35.0.485495099925.issue41539@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-08-13 21:35:36moi90setrecipients: + moi90, iritkatriel
2020-08-13 21:35:36moi90setmessageid: <1597354536.35.0.485495099925.issue41539@roundup.psfhosted.org>
2020-08-13 21:35:36moi90linkissue41539 messages
2020-08-13 21:35:36moi90create