Fix deadlock in gpiomonitor

pull/6/head
Michael Zanetti 2021-11-01 14:18:15 +01:00
parent 5623e9ae84
commit 6942124a97
1 changed files with 6 additions and 2 deletions

View File

@ -219,8 +219,12 @@ void GpioMonitor::run()
}
// Check if we should stop the thread
QMutexLocker stopLocker(&m_stopMutex);
if (m_stop) break;
m_stopMutex.lock();
if (m_stop) {
m_stopMutex.unlock();
break;
}
m_stopMutex.unlock();
// No interrupt occured
if (rc == 0)