mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-12 05:07:46 +02:00
Merge pull request #1694 from Trial97/concurrent
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user