]> Cypherpunks repositories - gostls13.git/commit
runtime: merge timerDeleted into timerModified
authorRuss Cox <rsc@golang.org>
Wed, 14 Feb 2024 16:57:00 +0000 (11:57 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 28 Feb 2024 16:44:00 +0000 (16:44 +0000)
commitdb8c6c8c7a198be10310387e9212004dd3163a27
tree10d131ff94b74b92f88f54fe9459927295074cec
parented0ad591d31daf911092487ceafb7b440d0ed8ea
runtime: merge timerDeleted into timerModified

When we make a change to a timer, we have to note the
desired change to t.when and then wait for the timer heap
owner to apply the change. There are two possible changes:
delete or set a new t.when. Most of the code for processing
these changes is the same, so we can simplify the code by
making both have the same state: timerDeleted is now
timerModified with t.nextwhen == 0.

This is part of a larger simplification of the state set.

[This is one CL in a refactoring stack making very small changes
in each step, so that any subtle bugs that we miss can be more
easily pinpointed to a small change.]

Change-Id: I1a2a12f8250bcd40f7b08b83f22c3a82b124eda6
Reviewed-on: https://go-review.googlesource.com/c/go/+/564123
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/time.go