Addon Manager: Fix race condition

This commit is contained in:
Chris Hennes
2022-02-15 13:04:49 -06:00
parent 8a92953f2a
commit 48e2ee100c

View File

@@ -294,10 +294,14 @@ if HAVE_QTNETWORK:
)
)
self.__request_queued.emit()
while not self.synchronous_complete[current_index]:
while True:
if QtCore.QThread.currentThread().isInterruptionRequested():
return None
QtCore.QCoreApplication.processEvents()
with self.synchronous_lock:
if self.synchronous_complete[current_index]:
break
with self.synchronous_lock:
self.synchronous_complete.pop(current_index)