runtime: don't access timer queue outside of lock

This was causing a flake on testing `context`.

Fixes #5469
This commit is contained in:
Damian Gryski
2026-06-19 10:51:17 -07:00
committed by Damian Gryski
parent 6a0acfc735
commit 6f686d12af
+1 -1
View File
@@ -79,8 +79,8 @@ func timerRunner() {
// Using a futex, so that the wait is exited early when adding a new
// (sooner-to-expire) timer.
val := timerFutex.Load()
timerQueueLock.Unlock()
timeout := ticksToNanoseconds(timerQueue.whenTicks() - now)
timerQueueLock.Unlock()
timerFutex.WaitUntil(val, uint64(timeout))
continue
}