diff --git a/src/fps_metrics.h b/src/fps_metrics.h index 985a745e..74739f5b 100644 --- a/src/fps_metrics.h +++ b/src/fps_metrics.h @@ -28,10 +28,13 @@ class fpsMetrics { void calculate(){ thread_init = true; - while (!terminate){ + while (true){ std::unique_lock lock(mtx); cv.wait(lock, [this] { return run; }); + if (terminate) + break; + std::vector sorted_values; for (const auto& p : fps_stats) sorted_values.push_back(p.second);