mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
removed processEvents from ConcurrentTask
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
47dbb09115
commit
8dd640819d
9 changed files with 84 additions and 87 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue