diff options
author | Michael Pratt <mpratt@google.com> | 2021-04-07 10:15:33 -0400 |
---|---|---|
committer | Michael Pratt <mpratt@google.com> | 2021-04-16 21:03:44 +0000 |
commit | f6e7fe2711849e2e57f79b89ee7928b8806618c8 (patch) | |
tree | a26e3286bdaa1f302611bf0c7b50f338ad154264 /src/runtime/lock_futex.go | |
parent | 9fbcba6664840ada5aaedb7f1a587d0cca1c9035 (diff) | |
download | go-f6e7fe2711849e2e57f79b89ee7928b8806618c8.tar.gz go-f6e7fe2711849e2e57f79b89ee7928b8806618c8.zip |
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>
Diffstat (limited to 'src/runtime/lock_futex.go')
-rw-r--r-- | src/runtime/lock_futex.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/lock_futex.go b/src/runtime/lock_futex.go index 017b481c64..e4c8d01941 100644 --- a/src/runtime/lock_futex.go +++ b/src/runtime/lock_futex.go @@ -239,7 +239,7 @@ func notetsleepg(n *note, ns int64) bool { return ok } -func beforeIdle(int64) (*g, bool) { +func beforeIdle(int64, int64) (*g, bool) { return nil, false } |