removed processEvents from ConcurrentTask

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2023-10-09 01:50:14 +03:00
parent 47dbb09115
commit 8dd640819d
9 changed files with 84 additions and 87 deletions

View File

@@ -37,13 +37,13 @@ class BasicTask_MultiStep : public Task {
class BigConcurrentTask : public ConcurrentTask {
Q_OBJECT
void startNext() override
void executeNextSubTask() override
{
// This is here only to help fill the stack a bit more quickly (if there's an issue, of course :^))
// Each tasks thus adds 1024 * 4 bytes to the stack, at the very least.
[[maybe_unused]] volatile std::array<uint32_t, 1024> some_data_on_the_stack{};
ConcurrentTask::startNext();
ConcurrentTask::executeNextSubTask();
}
};
@@ -71,11 +71,14 @@ class BigConcurrentTaskThread : public QThread {
quit();
});
m_deadline.start();
if (thread() != QThread::currentThread()) {
QMetaObject::invokeMethod(this, &BigConcurrentTaskThread::start_timer, Qt::QueuedConnection);
}
big_task.run();
exec();
}
void start_timer() { m_deadline.start(); }
public:
bool passed_the_deadline = false;