replay: unlock mutex before sleep (#22213)

This commit is contained in:
Dean Lee
2021-09-13 15:57:03 +08:00
committed by GitHub
parent eb4a28af11
commit 365e8bfd93
+2
View File
@@ -201,6 +201,7 @@ void Replay::stream() {
std::unique_lock lk(lock);
if (!events || events->size() == 0) {
lk.unlock();
qDebug() << "waiting for events";
QThread::msleep(100);
continue;
@@ -285,6 +286,7 @@ void Replay::stream() {
}
}
}
lk.unlock();
updating_events = false;
usleep(0);
}