replay: unlock mutex before sleep (#22213)

old-commit-hash: 365e8bfd93
commatwo_master
Dean Lee 4 years ago committed by GitHub
parent b8c56b5b75
commit 1fd8466af0
  1. 2
      selfdrive/ui/replay/replay.cc

@ -201,6 +201,7 @@ void Replay::stream() {
std::unique_lock lk(lock); std::unique_lock lk(lock);
if (!events || events->size() == 0) { if (!events || events->size() == 0) {
lk.unlock();
qDebug() << "waiting for events"; qDebug() << "waiting for events";
QThread::msleep(100); QThread::msleep(100);
continue; continue;
@ -285,6 +286,7 @@ void Replay::stream() {
} }
} }
} }
lk.unlock();
updating_events = false; updating_events = false;
usleep(0); usleep(0);
} }

Loading…
Cancel
Save