4
1
mirror of https://github.com/QuasarApp/Heart.git synced 2025-05-05 22:19:41 +00:00

fix async render loop

This commit is contained in:
Andrei Yankovich 2025-01-20 18:22:33 +01:00
parent 999012cf54
commit 58f1cb21e5
2 changed files with 5 additions and 1 deletions

@ -15,6 +15,10 @@ AsyncRenderLoop::AsyncRenderLoop(QThread *thread, QObject *ptr): Async(thread, p
}
AsyncRenderLoop::~AsyncRenderLoop() {
stop();
}
void QH::AsyncRenderLoop::run() {
m_run = true;
asyncLauncher([this](){
@ -25,7 +29,6 @@ void QH::AsyncRenderLoop::run() {
void QH::AsyncRenderLoop::stop() {
m_run = false;
thread()->exit();
thread()->wait();
}

@ -41,6 +41,7 @@ class HEARTSHARED_EXPORT AsyncRenderLoop: public Async
Q_OBJECT
public:
AsyncRenderLoop(QThread* thread, QObject* ptr = nullptr);
~AsyncRenderLoop();
/**
* @brief run This method starts the render loop.