]> Cypherpunks repositories - gostls13.git/commit
runtime: keep adjusted timers in timerMoving status until moved
authorIan Lance Taylor <iant@golang.org>
Tue, 5 Nov 2019 15:24:18 +0000 (07:24 -0800)
committerIan Lance Taylor <iant@golang.org>
Tue, 5 Nov 2019 18:37:06 +0000 (18:37 +0000)
commitc3cef0bfe5f503ee016fc61e58f5ee1b78dbd962
tree828d3cadc8c5ac7972044aad290a393b454009e3
parenta9c0cc6f6744654de7f8fdff52f5da601a109d11
runtime: keep adjusted timers in timerMoving status until moved

Before this CL adjustTimers left timers being moved in an inconsistent
state: status timerWaiting but not on a P. Simplify the code by
leaving the timers in timerMoving status until they are actually moved.
Other functions (deltimer, modtimer) will wait until the move is complete
before changing anything on the timer. This does leave timers in timerMoving
state for longer, but still not all that long.

Fixes #35367

Change-Id: I31851002fb4053bd6914139125b4c82a68bf6fb2
Reviewed-on: https://go-review.googlesource.com/c/go/+/205418
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/net/timeout_test.go
src/runtime/time.go