replay: unlock mutex before sleep (#22213)

old-commit-hash: 365e8bfd93046dc16caf23867ea094d2fe0f8e6a
This commit is contained in:
Dean Lee
2021-09-13 15:57:03 +08:00
committed by GitHub
parent b8c56b5b75
commit 1fd8466af0
+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);
}