Skip to content

Commit a711073

Browse files
committed
Fix hang when processing additional stats
Signed-off-by: Maxime Gervais <[email protected]>
1 parent 80ed24f commit a711073

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Source/Core/CommonStats.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,6 @@ void CommonStats::writeAdditionalStats(std::stringstream &stream, size_t index)
263263

264264
void CommonStats::updateAdditionalStats(StatsValueInfo::Type type, size_t oldSize, size_t size)
265265
{
266-
// Lock data
267-
QMutexLocker Lock(&Mutex);
268-
269266
if (type==StatsValueInfo::Int)
270267
{
271268
auto additionalIntStats_Old = additionalIntStats;

Source/Core/CommonStats.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ class CommonStats
166166
typedef std::string StringStatsKey;
167167

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

@@ -200,8 +199,11 @@ class CommonStats
200199
double** additionalDoubleStats;
201200
char*** additionalStringStats;
202201

203-
// Thread synchronisation
204-
QMutex Mutex;
202+
// Thread synchronisation
203+
QMutex Mutex;
204+
205+
// Internal functions
206+
void updateAdditionalStats(StatsValueInfo::Type type, size_t oldSize, size_t size);
205207
};
206208

207209
#endif // Stats_H

0 commit comments

Comments
 (0)