diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-01-25 10:33:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 10:33:01 +0100 |
commit | 5186ad95d3cd66da8c844d9c3c0cd95b8b2f0b94 (patch) | |
tree | a7410870f79c21a52a9a0a58505a47c59f9bdec2 /launcher/tasks | |
parent | 0546345182c04cf90e3096ff9e38b002759de32c (diff) | |
parent | 90feaaf2df2e0a6e38bc21b6f96a3f53b443e1f4 (diff) | |
download | PrismLauncher-5186ad95d3cd66da8c844d9c3c0cd95b8b2f0b94.tar.gz PrismLauncher-5186ad95d3cd66da8c844d9c3c0cd95b8b2f0b94.tar.bz2 PrismLauncher-5186ad95d3cd66da8c844d9c3c0cd95b8b2f0b94.zip |
Merge pull request #784 from flowln/fix_resource_folder_double_smart_ptrs
Diffstat (limited to 'launcher/tasks')
-rw-r--r-- | launcher/tasks/ConcurrentTask.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/launcher/tasks/ConcurrentTask.cpp b/launcher/tasks/ConcurrentTask.cpp index 190d48d8..3cc37b2a 100644 --- a/launcher/tasks/ConcurrentTask.cpp +++ b/launcher/tasks/ConcurrentTask.cpp @@ -115,7 +115,7 @@ void ConcurrentTask::startNext() QMetaObject::invokeMethod(next.get(), &Task::start, Qt::QueuedConnection); // Allow going up the number of concurrent tasks in case of tasks being added in the middle of a running task. - int num_starts = m_total_max_size - m_doing.size(); + int num_starts = qMin(m_queue.size(), m_total_max_size - m_doing.size()); for (int i = 0; i < num_starts; i++) QMetaObject::invokeMethod(this, &ConcurrentTask::startNext, Qt::QueuedConnection); } |