bpo-47029: Fix BrokenPipeError in multiprocessing.Queue at garbage collection and explicit close (#31913)

This commit is contained in:
Géry Ogam 2022-05-04 01:49:57 +02:00 committed by GitHub
parent f629dcfe83
commit dfb1b9da8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 12 deletions

View file

@ -0,0 +1,4 @@
Always close the read end of the pipe used by :class:`multiprocessing.Queue`
*after* the last write of buffered data to the write end of the pipe to avoid
:exc:`BrokenPipeError` at garbage collection and at
:meth:`multiprocessing.Queue.close` calls. Patch by Géry Ogam.