Skip to content

Commit ff8de16

Browse files
miss-islingtonaggshruti99encukou
authored
[3.13] gh-135730: Clarify multiprocessing.Queue close() documentation (GH-136803) (GH-136807)
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 f32e095 commit ff8de16

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
@@ -897,8 +897,13 @@ For an example of the usage of queues for interprocess communication see
897897

898898
.. method:: close()
899899

900-
Indicate that no more data will be put on this queue by the current
901-
process. The background thread will quit once it has flushed all buffered
900+
Close the queue: release internal resources.
901+
902+
A queue must not be used anymore after it is closed. For example,
903+
:meth:`~Queue.get`, :meth:`~Queue.put` and :meth:`~Queue.empty`
904+
methods must no longer be called.
905+
906+
The background thread will quit once it has flushed all buffered
902907
data to the pipe. This is called automatically when the queue is garbage
903908
collected.
904909

0 commit comments

Comments
 (0)