Skip to content

Commit df74c3c

Browse files
committed
threading
1 parent d88a3c1 commit df74c3c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

modules/ui_extensions.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def check_updates(id_task, disable_list):
106106
exts = [ext for ext in extensions.extensions if ext.remote is not None and ext.name not in disabled]
107107
shared.state.job_count = len(exts)
108108

109-
for ext in exts:
109+
def _check_update(ext):
110110
shared.state.textinfo = ext.name
111111

112112
try:
@@ -117,6 +117,14 @@ def check_updates(id_task, disable_list):
117117
except Exception:
118118
errors.report(f"Error checking updates for {ext.name}", exc_info=True)
119119

120+
threads = []
121+
for ext in exts:
122+
thread = threading.Thread(target=_check_update, args=(ext,))
123+
thread.start()
124+
threads.append(thread)
125+
126+
for thread in threads:
127+
thread.join()
120128
shared.state.nextjob()
121129

122130
return extension_table(), ""

0 commit comments

Comments
 (0)