mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-09-16 01:56:55 +00:00
Fix a data race
This commit is contained in:
parent
717acb3e40
commit
405ad22372
3 changed files with 11 additions and 2 deletions
|
@ -59,6 +59,15 @@ type StatsData struct {
|
|||
// I don't really care.
|
||||
var Statistics = newStatsData()
|
||||
|
||||
var CommandCounter = make(chan Command, 10)
|
||||
|
||||
func commandCounter() {
|
||||
for cmd := range CommandCounter {
|
||||
Statistics.CommandsIssuedTotal++
|
||||
Statistics.CommandsIssuedMap[cmd]++
|
||||
}
|
||||
}
|
||||
|
||||
const StatsDataVersion = 5
|
||||
const pageSize = 4096
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue