ProcStats : Use mutex lock to make fetch() thread safe.
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
Merge request reports
Activity
Filter activity
added 1 commit
- 924744e4 - ProcStats: remove data members that do not need caching
added 1 commit
- e5299b79 - ProcStats: remove data members that do not need caching
added 1 commit
- 6118e38b - ProcStats: remove data members that do not need caching
- Resolved by Christopher Rob Jones
added 1 commit
- e321a6ae - ProcStats: Always use lock in fetch(...) as state is always updated
added 1 commit
- 26890325 - ProcStats: Attempt to reconnection to process proc stat when information appeats corrupted
added 1 commit
- 8c0ae0cc - ProcStats: Attempt to reconnection to process proc stat when information appeats corrupted
added 1 commit
- a018d4bb - ProcStats: Attempt to reconnection to process proc stat when information appeats corrupted
added 1 commit
- 9929a45a - ProcStats: default init members of linux_proc struct
added 1 commit
- 0866141a - ProcStats: default init members of linux_proc struct
added 1 commit
- cd2fd388 - ProcStats: default init members of linux_proc struct
added 1 commit
- b8775b50 - ProcStats: default init members of linux_proc struct
added 1 commit
- 81204ee2 - ProcStats: default init members of linux_proc struct
added 1 commit
- f17c66bd - ProcStats: default init members of linux_proc struct
added 1 commit
- 214fc69f - ProcStats: default init members of linux_proc struct
assigned to @clemenci
Please register or sign in to reply