1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Use benaphore instead of mutex.

This commit is contained in:
Bartosz Taudul
2017-11-15 21:49:41 +01:00
parent 6cc2ea8d0e
commit 13d8d9255e
4 changed files with 38 additions and 29 deletions
+3 -3
View File
@@ -3,7 +3,6 @@
#include <atomic>
#include <map>
#include <mutex>
#include <string>
#include <thread>
#include <unordered_map>
@@ -17,6 +16,7 @@
#include "TracyEvent.hpp"
#include "TracySlab.hpp"
#include "TracyVector.hpp"
#include "tracy_benaphore.h"
struct ImVec2;
@@ -164,7 +164,7 @@ private:
bool m_staticView;
// this block must be locked
std::mutex m_lock;
NonRecursiveBenaphore m_lock;
Vector<int64_t> m_frames;
Vector<ThreadData*> m_threads;
Vector<PlotData*> m_plots;
@@ -183,7 +183,7 @@ private:
Vector<SourceLocation*> m_sourceLocationPayload;
std::unordered_map<SourceLocation*, uint32_t, SourceLocationHasher, SourceLocationComparator> m_sourceLocationPayloadMap;
std::mutex m_mbpslock;
NonRecursiveBenaphore m_mbpslock;
std::vector<float> m_mbps;
// not used for vis - no need to lock