diff --git a/src/runtime/scheduler_threads.go b/src/runtime/scheduler_threads.go index ef53918d01..5eed9f2486 100644 --- a/src/runtime/scheduler_threads.go +++ b/src/runtime/scheduler_threads.go @@ -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 }