Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9bbc5db

Browse filesBrowse files
committed
change comment
1 parent 5f31f8e commit 9bbc5db
Copy full SHA for 9bbc5db

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed

‎Lib/queue.py

Copy file name to clipboardExpand all lines: Lib/queue.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@ def shutdown(self, immediate=False):
245245
if immediate:
246246
self.shutdown_state = _queue_shutdown_immediate
247247
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
248252
self.all_tasks_done.notify_all()
249253
else:
250254
self.shutdown_state = _queue_shutdown

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.