Merge pull request #784 from flowln/fix_resource_folder_double_smart_ptrs

This commit is contained in:
Sefa Eyeoglu
2023-01-25 10:33:01 +01:00
parent 4827f7e317
commit 16b48866f4
2 changed files with 5 additions and 5 deletions

View File

@ -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);
}