We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f31f8e commit 9bbc5dbCopy full SHA for 9bbc5db
Lib/queue.py
@@ -245,6 +245,10 @@ def shutdown(self, immediate=False):
245
if immediate:
246
self.shutdown_state = _queue_shutdown_immediate
247
self.not_empty.notify_all()
248
+ # set self.unfinished_tasks to 0
249
+ # to break the loop in 'self.join()'
250
+ # when quits from `wait()`
251
+ self.unfinished_tasks = 0
252
self.all_tasks_done.notify_all()
253
else:
254
self.shutdown_state = _queue_shutdown
0 commit comments