mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-96471: Correct docs for queue shutdown (#115838)
This commit is contained in:
parent
a0a8d9ffe0
commit
9402ea63f7
2 changed files with 8 additions and 11 deletions
|
@ -187,11 +187,12 @@ fully processed by daemon consumer threads.
|
|||
processed (meaning that a :meth:`task_done` call was received for every item
|
||||
that had been :meth:`put` into the queue).
|
||||
|
||||
``shutdown(immediate=True)`` calls :meth:`task_done` for each remaining item
|
||||
in the queue.
|
||||
|
||||
Raises a :exc:`ValueError` if called more times than there were items placed in
|
||||
the queue.
|
||||
|
||||
Raises :exc:`ShutDown` if the queue has been shut down immediately.
|
||||
|
||||
|
||||
.. method:: Queue.join()
|
||||
|
||||
|
@ -202,8 +203,6 @@ fully processed by daemon consumer threads.
|
|||
indicate that the item was retrieved and all work on it is complete. When the
|
||||
count of unfinished tasks drops to zero, :meth:`join` unblocks.
|
||||
|
||||
Raises :exc:`ShutDown` if the queue has been shut down immediately.
|
||||
|
||||
|
||||
Example of how to wait for enqueued tasks to be completed::
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue