summaryrefslogtreecommitdiff
path: root/player-android/android/app/src
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-20 07:06:04 +0300
committerPaul Buetow <paul@buetow.org>2026-05-20 07:06:04 +0300
commit7c8e71b85d6475576bc1d22472ee399de7b62247 (patch)
treed3b79582b039c996bb0f736ae229eec96ee4263a /player-android/android/app/src
parentd2c18b25caffafa64d90195d24bca77315f76d16 (diff)
Make GCWorker.Start idempotent via sync.Once (x9)
Calling Start a second time used to spawn a duplicate goroutine, leaking the first one and double-counting tick events. sync.Once matches the existing lifecycle (Stop is also one-shot — the worker is not designed to be restarted after Stop), so the simplest fix is a startOnce.Do guard. Added a unit test that calls Start twice and asserts only one goroutine runs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Diffstat (limited to 'player-android/android/app/src')
0 files changed, 0 insertions, 0 deletions