ProcStats : Use mutex lock to make fetch() thread safe.
Compare changes
+ 36
− 36
@@ -198,41 +198,41 @@
@@ -259,13 +259,13 @@ void ProcStats::open_ufd() {
Whilst investigating a possible memory issue using the Memory Auditor, I discovered the information printed was garbled if multiple threads where used.
The issue was the ProcStats::fetch
method which was not thread safe. This MR fixes that with a simple mutex lock.
I also did a drive-by cleanup and code modernisation.
FYI @clemenci