Skip to content

Commit

Permalink
AddonManager: Work around thread-safety issue in update
Browse files Browse the repository at this point in the history
  • Loading branch information
chennes committed May 27, 2022
1 parent 975b8ea commit 4c2972c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Mod/AddonManager/addonmanager_workers.py
Expand Up @@ -1639,9 +1639,10 @@ def run(self):
for repo in self.repos:
self.repo_queue.put(repo)

# Following the QNetworkAccessManager model, we'll spawn six threads to process these requests in parallel:
# The original design called for multiple update threads at the same time, but the updater
# itself is not thread-safe, so for the time being only spawn one update thread.
workers = []
for _ in range(6):
for _ in range(1):
worker = UpdateSingleWorker(self.repo_queue)
worker.success.connect(self.on_success)
worker.failure.connect(self.on_failure)
Expand Down

0 comments on commit 4c2972c

Please sign in to comment.