From 9eb99ad7bc29309e45a2216341215d9e085a9103 Mon Sep 17 00:00:00 2001 From: Drath Date: Thu, 18 Sep 2025 23:59:04 +0200 Subject: [PATCH] tryinf to presere sanirty --- main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 0a0c4d6..e89155c 100644 --- a/main.cpp +++ b/main.cpp @@ -71,7 +71,9 @@ void sensorsThread(std::stop_token st, Sensors* s) { while (!st.stop_requested()) { auto start = std::chrono::steady_clock::now(); { - std::lock_guard lock(s->mtx); // will unlock when it goes out of scope, this is why this whole thing is in braces + // this will unlock when program goes out of scope + std::lock_guard lock(s->mtx); + // maybe make these take pointers too s->td = getTimeDate(); s->loadavg = getAvgs(); s->ram = getRam();