enhancement: marked several threads as 'daemon' for a faster termination

This commit is contained in:
Vinicius Moreira
2023-11-26 11:16:43 -03:00
parent 676f4300b7
commit 925aaf35c5
14 changed files with 46 additions and 33 deletions

View File

@@ -434,7 +434,7 @@ class SnapManager(SoftwareManager, SettingsController):
res.append(cached_sug)
cached_count += 1
else:
t = Thread(target=self._fill_suggestion, args=(name, ids_prios[name], snapd_client, res))
t = Thread(target=self._fill_suggestion, args=(name, ids_prios[name], snapd_client, res), daemon=True)
t.start()
threads.append(t)
time.sleep(0.001) # to avoid being blocked