PerformanceTracker: Use shared_mutex instead of mutex so multiple threads can read at the same time.

This commit is contained in:
Sam Belliveau
2022-12-30 14:56:08 -05:00
committed by Admiral H. Curtiss
parent 9143eb00fb
commit bc46089ab0
2 changed files with 13 additions and 11 deletions

View File

@ -6,8 +6,8 @@
#include <array>
#include <chrono>
#include <fstream>
#include <mutex>
#include <optional>
#include <shared_mutex>
#include "Common/CommonTypes.h"
@ -100,5 +100,5 @@ private: // Functions for managing dt queue
mutable std::optional<DT> m_dt_std = std::nullopt;
// Used to enable thread safety with the performance tracker
mutable std::mutex m_mutex;
mutable std::shared_mutex m_mutex;
};