Title: multiprocessing.Queue prevents program exit when containing a reasonable amount of data
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Dominik Schmid, davin, pitrou
Priority: normal Keywords:

Created on 2020-09-11 10:37 by Dominik Schmid, last changed 2020-09-17 06:23 by Dominik Schmid.

File name Uploaded Description Edit Dominik Schmid, 2020-09-11 10:37
Messages (1)
msg376716 - (view) Author: Dominik Schmid (Dominik Schmid) Date: 2020-09-11 10:37
Reproduction steps: run the attached

expected result: 
"done." is printed and the program terminates.

actual result:
"done." is printed and the program does not terminate.

Documentation link for your convenience:

The lowest to trigger the bug seems to be 1639 42's in the queue.
If I put numpy.array([42]) into the queue instead of 42, I need much fewer items to trigger the bug.
When q.close() is called explicitly, it always terminates but sometimes prints a BrokenPipeError.

Reproduced on windows (Python 3.7.2) and Debian (Python 2.7.16).
Date User Action Args
2020-09-17 06:23:09Dominik Schmidsetnosy: + pitrou, davin
2020-09-11 10:37:24Dominik Schmidcreate