Skip to content

Commit

Permalink
Fix hang when processing additional stats
Browse files Browse the repository at this point in the history
Signed-off-by: Maxime Gervais <[email protected]>
  • Loading branch information
g-maxime committed Dec 23, 2024
1 parent 80ed24f commit a711073
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 0 additions & 3 deletions Source/Core/CommonStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,6 @@ void CommonStats::writeAdditionalStats(std::stringstream &stream, size_t index)

void CommonStats::updateAdditionalStats(StatsValueInfo::Type type, size_t oldSize, size_t size)
{
// Lock data
QMutexLocker Lock(&Mutex);

if (type==StatsValueInfo::Int)
{
auto additionalIntStats_Old = additionalIntStats;
Expand Down
8 changes: 5 additions & 3 deletions Source/Core/CommonStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ class CommonStats
typedef std::string StringStatsKey;

void initializeAdditionalStats();
void updateAdditionalStats(StatsValueInfo::Type type, size_t oldSize, size_t size);
void processAdditionalStats(const char* key, const char* value, bool statsMapInitialized);
void writeAdditionalStats(std::stringstream& stream, size_t index);

Expand Down Expand Up @@ -200,8 +199,11 @@ class CommonStats
double** additionalDoubleStats;
char*** additionalStringStats;

// Thread synchronisation
QMutex Mutex;
// Thread synchronisation
QMutex Mutex;

// Internal functions
void updateAdditionalStats(StatsValueInfo::Type type, size_t oldSize, size_t size);
};

#endif // Stats_H

0 comments on commit a711073

Please sign in to comment.