mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.14] Fix Queue.shutdown docs for condition to unblock a join (gh-137088) (#141073)
(cherry picked from commit ea06ae5b5e)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
This commit is contained in:
parent
9878611f28
commit
12847bfff7
4 changed files with 18 additions and 12 deletions
|
|
@ -120,9 +120,10 @@ Queue
|
|||
raise :exc:`QueueShutDown`.
|
||||
|
||||
If *immediate* is true, the queue is terminated immediately.
|
||||
The queue is drained to be completely empty. All callers of
|
||||
:meth:`~Queue.join` are unblocked regardless of the number
|
||||
of unfinished tasks. Blocked callers of :meth:`~Queue.get`
|
||||
The queue is drained to be completely empty and the count
|
||||
of unfinished tasks is reduced by the number of tasks drained.
|
||||
If unfinished tasks is zero, callers of :meth:`~Queue.join`
|
||||
are unblocked. Also, blocked callers of :meth:`~Queue.get`
|
||||
are unblocked and will raise :exc:`QueueShutDown` because the
|
||||
queue is empty.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue