[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:
Stan Ulbrych 2025-11-06 05:41:31 +00:00 committed by GitHub
parent 9878611f28
commit 12847bfff7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 12 deletions

View file

@ -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.