@@ -73,9 +73,7 @@ def task_done(self):
73
73
for every item that had been put() into the queue).
74
74
75
75
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.
79
77
'''
80
78
with self .all_tasks_done :
81
79
unfinished = self .unfinished_tasks - 1
@@ -93,8 +91,6 @@ def join(self):
93
91
to indicate the item was retrieved and all work on it is complete.
94
92
95
93
When the count of unfinished tasks drops to zero, join() unblocks.
96
-
97
- Raises ShutDown if the queue has been shut down immediately.
98
94
'''
99
95
with self .all_tasks_done :
100
96
while self .unfinished_tasks :
@@ -227,13 +223,13 @@ def get_nowait(self):
227
223
return self .get (block = False )
228
224
229
225
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 .
231
227
232
228
By default, gets will only raise once the queue is empty. Set
233
229
'immediate' to True to make gets raise immediately instead.
234
230
235
231
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'.
237
233
'''
238
234
with self .mutex :
239
235
self .is_shutdown = True
0 commit comments