Skip to content

Commit 63bdd42

Browse files
committed
Remove incorrect queue-shutdown doc
1 parent 4ee6bdf commit 63bdd42

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

Doc/library/queue.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,7 @@ fully processed by daemon consumer threads.
188188
that had been :meth:`put` into the queue).
189189

190190
Raises a :exc:`ValueError` if called more times than there were items placed in
191-
the queue.
192-
193-
Raises :exc:`ShutDown` if the queue has been shut down immediately.
191+
the queue, or after an immediate shutdown.
194192

195193

196194
.. method:: Queue.join()
@@ -202,8 +200,6 @@ fully processed by daemon consumer threads.
202200
indicate that the item was retrieved and all work on it is complete. When the
203201
count of unfinished tasks drops to zero, :meth:`join` unblocks.
204202

205-
Raises :exc:`ShutDown` if the queue has been shut down immediately.
206-
207203

208204
Example of how to wait for enqueued tasks to be completed::
209205

Lib/queue.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@ def task_done(self):
7373
for every item that had been put() into the queue).
7474
7575
Raises a ValueError if called more times than there were items
76-
placed in the queue.
77-
78-
Raises ShutDown if the queue has been shut down immediately.
76+
placed in the queue, or after an immediate shutdown.
7977
'''
8078
with self.all_tasks_done:
8179
unfinished = self.unfinished_tasks - 1
@@ -93,8 +91,6 @@ def join(self):
9391
to indicate the item was retrieved and all work on it is complete.
9492
9593
When the count of unfinished tasks drops to zero, join() unblocks.
96-
97-
Raises ShutDown if the queue has been shut down immediately.
9894
'''
9995
with self.all_tasks_done:
10096
while self.unfinished_tasks:
@@ -227,13 +223,13 @@ def get_nowait(self):
227223
return self.get(block=False)
228224

229225
def shutdown(self, immediate=False):
230-
'''Shut-down the queue, making queue gets and puts raise.
226+
'''Shut-down the queue, making queue gets and puts raise ShutDown.
231227
232228
By default, gets will only raise once the queue is empty. Set
233229
'immediate' to True to make gets raise immediately instead.
234230
235231
All blocked callers of put() will be unblocked, and also get()
236-
and join() if 'immediate'. The ShutDown exception is raised.
232+
and join() if 'immediate'.
237233
'''
238234
with self.mutex:
239235
self.is_shutdown = True

0 commit comments

Comments
 (0)