Skip to content

Commit 03457ca

Browse files
miss-islingtonaggshruti99encukou
authored
[3.14] gh-135730: Clarify multiprocessing.Queue close() documentation (GH-136803) (GH-136806)
gh-135730: Clarify multiprocessing.Queue close() documentation (GH-136803) Add a copy of the text from SimpleQueue.close() --------- (cherry picked from commit f575588) Co-authored-by: aggshruti99 <aggshruti99@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent 8b4275c commit 03457ca

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)