This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [doc] multiprocessing.Queue fails intermittently with "Broken pipe"
Type: behavior Stage:
Components: Documentation, Library (Lib) Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Samuel Grayson, docs@python, iritkatriel
Priority: normal Keywords:

Created on 2019-10-23 01:40 by Samuel Grayson, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
test.py Samuel Grayson, 2019-10-23 01:40
Messages (2)
msg355204 - (view) Author: Samuel Grayson (Samuel Grayson) Date: 2019-10-23 01:40
See [this SO post for more details](https://stackoverflow.com/q/51680479/1078199)
msg410932 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-19 10:16
I don't think you're supposed to close the queue more than once. The documentation can be improved on that. Currently the documentation of close is:

close()
Indicate that no more data will be put on this queue by the current process. The background thread will quit once it has flushed all buffered data to the pipe. This is called automatically when the queue is garbage collected.

https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Queue.close

That could be read to imply to each process needs to indicate when it is done.
History
Date User Action Args
2022-04-11 14:59:22adminsetgithub: 82742
2022-01-19 10:16:13iritkatrielsetassignee: docs@python
type: behavior

components: + Documentation
title: multiprocessing.Queue fails intermittently with "Broken pipe" -> [doc] multiprocessing.Queue fails intermittently with "Broken pipe"
nosy: + iritkatriel, docs@python
versions: + Python 3.9, Python 3.10, Python 3.11, - Python 3.6, Python 3.7, Python 3.8
messages: + msg410932
2019-10-23 01:40:48Samuel Graysoncreate