mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
removed the concurent task destructor behaivior
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
0ca3873f1c
commit
2aeb829176
2 changed files with 5 additions and 10 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue