Skip to content

Commit f575588

Browse files
aggshruti99saggarwal145encukou
authored
gh-135730: Clarify multiprocessing.Queue close() documentation (#136803)
Add a copy of the text from SimpleQueue.close() --------- Co-authored-by: saggarwal145 <saggarwal145@bloomberg.net> Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent d19bb44 commit f575588

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Doc/library/multiprocessing.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -936,8 +936,13 @@ For an example of the usage of queues for interprocess communication see
936936

937937
.. method:: close()
938938

939-
Indicate that no more data will be put on this queue by the current
940-
process. The background thread will quit once it has flushed all buffered
939+
Close the queue: release internal resources.
940+
941+
A queue must not be used anymore after it is closed. For example,
942+
:meth:`~Queue.get`, :meth:`~Queue.put` and :meth:`~Queue.empty`
943+
methods must no longer be called.
944+
945+
The background thread will quit once it has flushed all buffered
941946
data to the pipe. This is called automatically when the queue is garbage
942947
collected.
943948

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy