mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 05:37:42 +02:00
removed the concurent task destructor behaivior
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user