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();