mirror of
https://github.com/QuasarApp/Heart.git
synced 2025-04-26 09:44:37 +00:00
fix async render loop
This commit is contained in:
parent
999012cf54
commit
58f1cb21e5
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user