removed the concurent task destructor behaivior
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
0ca3873f1c
commit
2aeb829176
@ -160,7 +160,6 @@ void EnsureMetadataTask::executeTask()
|
||||
if (m_current_task)
|
||||
m_current_task.reset();
|
||||
});
|
||||
connect(version_task.get(), &Task::failed, this, &EnsureMetadataTask::emitFailed);
|
||||
|
||||
if (m_mods.size() > 1)
|
||||
setStatus(tr("Requesting metadata information from %1...").arg(ProviderCaps.readableName(m_provider)));
|
||||
|
@ -46,13 +46,9 @@ ConcurrentTask::ConcurrentTask(QObject* parent, QString task_name, int max_concu
|
||||
|
||||
ConcurrentTask::~ConcurrentTask()
|
||||
{
|
||||
for (auto task : m_queue) {
|
||||
for (auto task : m_doing) {
|
||||
if (task)
|
||||
task->deleteLater();
|
||||
}
|
||||
for (auto task : m_done) {
|
||||
if (task)
|
||||
task->deleteLater();
|
||||
task->disconnect(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,6 +114,9 @@ void ConcurrentTask::executeNextSubTask()
|
||||
if (!isRunning()) {
|
||||
return;
|
||||
}
|
||||
if (m_doing.count() >= m_total_max_size) {
|
||||
return;
|
||||
}
|
||||
if (m_queue.isEmpty()) {
|
||||
if (m_doing.isEmpty()) {
|
||||
if (m_failed.isEmpty())
|
||||
@ -127,9 +126,6 @@ void ConcurrentTask::executeNextSubTask()
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (m_doing.count() >= m_total_max_size) {
|
||||
return;
|
||||
}
|
||||
|
||||
startSubTask(m_queue.dequeue());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user