mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
[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 f575588ccf)
Co-authored-by: aggshruti99 <aggshruti99@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
8b4275c99a
commit
03457ca2ac
1 changed files with 7 additions and 2 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue