mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
PerformanceTracker: Use shared_mutex instead of mutex so multiple threads can read at the same time.
This commit is contained in:

committed by
Admiral H. Curtiss

parent
9143eb00fb
commit
bc46089ab0
@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user