Browse Source

Change the way worker threads close

doc-issue-template
MrS0m30n3 9 years ago
parent
commit
053112c736
1 changed files with 3 additions and 2 deletions
  1. 5
      youtube_dl_gui/downloadmanager.py

5
youtube_dl_gui/downloadmanager.py

@ -111,6 +111,9 @@ class DownloadManager(Thread):
# Close all the workers
for worker in self._workers:
worker.close()
# Join and collect
for worker in self._workers:
worker.join()
self._successful += worker.successful
@ -148,8 +151,6 @@ class DownloadManager(Thread):
"""
self._talk_to_gui('closing')
self._running = False
for worker in self._workers:
worker.stop_download()
def add_url(self, url):
"""Add given url to the urls_list.

Loading…
Cancel
Save