replay: unlock mutex before sleep (#22213)

pull/22216/head
Dean Lee 4 years ago committed by GitHub
parent eb4a28af11
commit 365e8bfd93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/ui/replay/replay.cc

@ -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);
}

Loading…
Cancel
Save