core: fix crash caused by exiting without joining running thread (#464)

This commit is contained in:
Yang, Ying-chao 2024-08-21 18:25:14 +08:00 committed by GitHub
parent f673759d01
commit 7bb4113a7e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -405,8 +405,14 @@ void CHyprlock::run() {
acquireSessionLock(); acquireSessionLock();
if (m_bTerminate) // Recieved finished // Recieved finished
if (m_bTerminate) {
m_sLoopState.timerEvent = true;
m_sLoopState.timerCV.notify_all();
g_pRenderer->asyncResourceGatherer->notify();
g_pRenderer->asyncResourceGatherer->await();
exit(1); exit(1);
}
g_pAuth = std::make_unique<CAuth>(); g_pAuth = std::make_unique<CAuth>();
g_pAuth->start(); g_pAuth->start();