https://github.com/python/cpython/commit/f575588ccf27d8d54a1e99cfda944f2614b3255c commit: f575588ccf27d8d54a1e99cfda944f2614b3255c branch: main author: aggshruti99 <[email protected]> committer: encukou <[email protected]> date: 2025-07-19T14:24:39+02:00 summary:
gh-135730: Clarify multiprocessing.Queue close() documentation (#136803) Add a copy of the text from SimpleQueue.close() --------- Co-authored-by: saggarwal145 <[email protected]> Co-authored-by: Petr Viktorin <[email protected]> files: M Doc/library/multiprocessing.rst diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index 546876bd925db0..c80f78e614818e 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -936,8 +936,13 @@ For an example of the usage of queues for interprocess communication see .. method:: 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 + Close the queue: release internal resources. + + A queue must not be used anymore after it is closed. For example, + :meth:`~Queue.get`, :meth:`~Queue.put` and :meth:`~Queue.empty` + methods must no longer be called. + + 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. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
