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

@@ -258,7 +258,7 @@ class WebApplicationManager(SoftwareManager, SettingsController):
def search(self, words: str, disk_loader: DiskCacheLoader, limit: int = -1, is_url: bool = False) -> SearchResult:
web_config = {}
thread_config = Thread(target=self._fill_config_async, args=(web_config,))
thread_config = Thread(target=self._fill_config_async, args=(web_config,), daemon=True)
thread_config.start()
res = SearchResult([], [], 0)
@@ -1069,7 +1069,7 @@ class WebApplicationManager(SoftwareManager, SettingsController):
web_config = {}
thread_config = Thread(target=self._fill_config_async, args=(web_config,))
thread_config = Thread(target=self._fill_config_async, args=(web_config,), daemon=True)
thread_config.start()
if self.suggestions:

View File

@@ -421,11 +421,13 @@ class EnvironmentUpdater:
if system_env:
self.logger.warning(f"Using system's nativefier to install {app.url}")
else:
node_check = Thread(target=self._check_and_fill_node, args=(env, components))
node_check = Thread(target=self._check_and_fill_node, args=(env, components), daemon=True)
node_check.start()
check_threads.append(node_check)
elec_check = Thread(target=self._check_and_fill_electron, args=(app, env, local_config, is_x86_x64_arch, widevine, components))
elec_check = Thread(target=self._check_and_fill_electron,
args=(app, env, local_config, is_x86_x64_arch, widevine, components),
daemon=True)
elec_check.start()
check_threads.append(elec_check)