mirror of
https://github.com/python/cpython.git
synced 2025-11-02 06:31:29 +00:00
[3.13] Fix docs for Queue.shutdown (gh-137028) (gh-137081)
This commit is contained in:
parent
74503acba7
commit
d9feec4542
4 changed files with 58 additions and 35 deletions
|
|
@ -80,9 +80,6 @@ def task_done(self):
|
|||
have been processed (meaning that a task_done() call was received
|
||||
for every item that had been put() into the queue).
|
||||
|
||||
shutdown(immediate=True) calls task_done() for each remaining item in
|
||||
the queue.
|
||||
|
||||
Raises a ValueError if called more times than there were items
|
||||
placed in the queue.
|
||||
'''
|
||||
|
|
@ -240,8 +237,8 @@ def shutdown(self, immediate=False):
|
|||
'immediate' to True to make gets raise immediately instead.
|
||||
|
||||
All blocked callers of put() and get() will be unblocked. If
|
||||
'immediate', a task is marked as done for each item remaining in
|
||||
the queue, which may unblock callers of join().
|
||||
'immediate', callers of join() are unblocked regardless of
|
||||
the number of unfinished tasks.
|
||||
'''
|
||||
with self.mutex:
|
||||
self.is_shutdown = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue