]> Cypherpunks repositories - gostls13.git/commit
runtime: move findrunnable timer delay computation closer to use
authorMichael Pratt <mpratt@google.com>
Wed, 7 Apr 2021 14:15:33 +0000 (10:15 -0400)
committerMichael Pratt <mpratt@google.com>
Fri, 16 Apr 2021 21:03:44 +0000 (21:03 +0000)
commitf6e7fe2711849e2e57f79b89ee7928b8806618c8
treea26e3286bdaa1f302611bf0c7b50f338ad154264
parent9fbcba6664840ada5aaedb7f1a587d0cca1c9035
runtime: move findrunnable timer delay computation closer to use

findrunnable has a couple places where delta is recomputed from a new
pollUntil value. This proves to be a pain in refactoring, as it is easy
to forget to do properly.

Move computation of delta closer to its use, where it is more logical
anyways.

This CL should have no functional changes.

For #43997.
For #44313.

Change-Id: I89980fd7f40f8a4c56c7540cae03ff99e12e1422
Reviewed-on: https://go-review.googlesource.com/c/go/+/307910
Trust: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/lock_futex.go
src/runtime/lock_js.go
src/runtime/lock_sema.go
src/runtime/proc.go