tryinf to presere sanirty

This commit is contained in:
Drath
2025-09-18 23:59:04 +02:00
parent e54befda99
commit 9eb99ad7bc

View File

@@ -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<std::mutex> 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<std::mutex> lock(s->mtx);
// maybe make these take pointers too
s->td = getTimeDate();
s->loadavg = getAvgs();
s->ram = getRam();