mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-01 20:35:06 +08:00
threading
This commit is contained in:
parent
d88a3c15f7
commit
df74c3c638
@ -106,7 +106,7 @@ def check_updates(id_task, disable_list):
|
||||
exts = [ext for ext in extensions.extensions if ext.remote is not None and ext.name not in disabled]
|
||||
shared.state.job_count = len(exts)
|
||||
|
||||
for ext in exts:
|
||||
def _check_update(ext):
|
||||
shared.state.textinfo = ext.name
|
||||
|
||||
try:
|
||||
@ -117,6 +117,14 @@ def check_updates(id_task, disable_list):
|
||||
except Exception:
|
||||
errors.report(f"Error checking updates for {ext.name}", exc_info=True)
|
||||
|
||||
threads = []
|
||||
for ext in exts:
|
||||
thread = threading.Thread(target=_check_update, args=(ext,))
|
||||
thread.start()
|
||||
threads.append(thread)
|
||||
|
||||
for thread in threads:
|
||||
thread.join()
|
||||
shared.state.nextjob()
|
||||
|
||||
return extension_table(), ""
|
||||
|
Loading…
Reference in New Issue
Block a user