Nick Craig-Wood
ae3c73f610
stats: fix race between ResetCounters and stopAverageLoop called from time.AfterFunc
...
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
2024-01-17 10:23:50 +00:00
..
2024-01-17 10:23:50 +00:00
2022-11-07 11:41:47 +00:00
2023-06-13 15:48:20 +01:00
2022-08-28 13:43:51 +02:00
2022-08-09 12:57:38 +01:00
2024-01-03 10:57:59 +00:00
2023-07-03 14:09:21 +01:00
2022-08-28 13:43:51 +02:00
2023-08-02 12:53:09 +01:00
2022-06-13 21:13:50 +02:00
2023-11-24 17:53:33 +00:00
2023-01-25 13:37:24 +01:00
2023-11-24 11:19:58 +00:00
2021-11-07 11:53:30 +00:00
2023-12-02 14:17:15 +00:00
2023-11-20 17:36:31 +00:00
2023-09-23 12:20:01 +01:00
2024-01-15 16:22:07 +00:00
2023-08-22 12:52:13 +01:00
2024-01-07 11:26:09 +00:00
2023-04-28 14:31:05 +01:00
2021-05-14 14:07:44 +01:00
2023-03-25 12:51:04 +01:00
2023-10-23 15:43:42 +01:00
2023-10-23 15:43:55 +01:00
2023-10-03 11:23:58 +01:00
2022-08-05 16:35:41 +01:00
2018-08-21 10:58:59 +01:00
2019-02-07 11:57:26 +00:00
2023-03-26 14:28:15 +02:00
2023-11-18 17:49:35 +00:00
2021-07-20 12:09:38 +01:00
2023-10-03 11:23:58 +01:00
2023-10-03 11:23:58 +01:00
2023-10-03 15:14:24 +01:00
2023-10-03 15:14:24 +01:00
2021-10-02 23:45:16 +03:00
2021-10-02 23:45:16 +03:00
2018-01-15 17:51:14 +00:00
2023-05-04 15:03:11 +01:00
2019-07-28 18:47:38 +01:00
2019-06-09 15:57:05 +01:00
2023-10-03 15:24:09 +01:00
2023-11-18 17:49:35 +00:00
2023-10-03 15:14:24 +01:00
2023-10-03 15:14:24 +01:00
2023-11-24 11:19:58 +00:00
2023-04-28 14:31:05 +01:00
2020-06-30 12:01:36 +01:00
2023-07-07 16:25:14 +01:00
2022-07-13 16:04:53 +01:00
2023-11-16 17:15:00 +00:00
2023-10-03 15:14:24 +01:00
2023-11-18 17:49:35 +00:00
2023-11-18 17:49:35 +00:00
2023-11-18 17:49:35 +00:00
2021-10-18 13:28:22 +01:00
2022-05-12 20:27:13 +01:00
2022-08-05 16:35:41 +01:00
2023-06-23 14:12:03 +01:00
2023-06-23 14:12:03 +01:00
2022-06-29 14:29:36 +01:00
2023-08-29 13:03:13 +01:00
2023-05-14 11:22:57 +01:00
2023-05-14 11:22:57 +01:00
2022-11-21 08:02:09 +00:00
2023-05-09 16:28:10 +01:00
2023-10-01 12:30:26 +01:00
2023-10-03 11:23:58 +01:00
2023-02-04 17:29:08 +01:00
2023-10-03 11:23:58 +01:00
2023-05-04 15:04:11 +01:00
2024-01-03 10:57:59 +00:00
2023-10-03 11:23:58 +01:00
2023-10-03 11:23:58 +01:00
2023-10-03 15:14:24 +01:00
2023-10-03 15:14:24 +01:00
2023-10-03 11:23:58 +01:00
2023-03-27 16:17:49 +01:00
2022-06-29 11:21:29 +01:00
2022-05-17 12:10:01 +01:00
2024-01-15 16:22:07 +00:00
2022-05-17 12:10:01 +01:00
2023-11-26 17:14:38 +00:00