mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Clear thread lists when stopping. Related to #62
This commit is contained in:
parent
68cd19baa4
commit
33c417942c
2 changed files with 6 additions and 0 deletions
|
|
@ -385,12 +385,16 @@ class Client:
|
|||
for i in self.updates_workers_list:
|
||||
i.join()
|
||||
|
||||
self.updates_workers_list.clear()
|
||||
|
||||
for _ in range(self.DOWNLOAD_WORKERS):
|
||||
self.download_queue.put(None)
|
||||
|
||||
for i in self.download_workers_list:
|
||||
i.join()
|
||||
|
||||
self.download_workers_list.clear()
|
||||
|
||||
self.dispatcher.stop()
|
||||
|
||||
self.is_started = False
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ class Dispatcher:
|
|||
for i in self.workers_list:
|
||||
i.join()
|
||||
|
||||
self.workers_list.clear()
|
||||
|
||||
def add_handler(self, handler, group: int):
|
||||
if group not in self.groups:
|
||||
self.groups[group] = []
|
||||
|
|
|
|||
Loading…
Reference in a new issue