ae3c73f610
Before this change StatsInfo.ResetCounters() and stopAverageLoop() (when called from time.AfterFunc) could race on StatsInfo.average. This was because the deferred stopAverageLoop accessed StatsInfo.average without locking. For some reason this only ever happened on macOS. This caused the CI to fail on macOS thus causing the macOS builds not to appear. This commit fixes the problem with a bit of extra locking. It also renames all StatsInfo methods that should be called without the lock to start with an initial underscore as this is the convention we use elsewhere. Fixes #7567 |
||
---|---|---|
.. | ||
accounting.go | ||
accounting_other.go | ||
accounting_test.go | ||
accounting_unix.go | ||
inprogress.go | ||
prometheus.go | ||
stats.go | ||
stats_groups.go | ||
stats_groups_test.go | ||
stats_test.go | ||
token_bucket.go | ||
token_bucket_test.go | ||
tpslimit.go | ||
tpslimit_test.go | ||
transfer.go | ||
transfermap.go |