Skip to content
Snippets Groups Projects

ProcStats : Use mutex lock to make fetch() thread safe.

Merged Christopher Rob Jones requested to merge jonrob/Gaudi:ProcStats-thread-safe into master
All threads resolved!
Compare and Show latest version
2 files
+ 8
8
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -267,11 +267,11 @@ bool ProcStats::fetch( procInfo& f ) {
#if defined( __linux__ ) or defined( __APPLE__ )
std::scoped_lock lock{m_mutex};
std::scoped_lock lock{ m_mutex };
double pr_size{0}, pr_rssize{0};
double pr_size{ 0 }, pr_rssize{ 0 };
linux_proc pinfo;
int cnt{0};
int cnt{ 0 };
m_ufd.lseek( 0, SEEK_SET );
Loading