]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.16] runtime: don't clear timerModifiedEarliest if adjustTimers...
authorIan Lance Taylor <iant@golang.org>
Thu, 22 Jul 2021 02:57:56 +0000 (19:57 -0700)
committerIan Lance Taylor <iant@golang.org>
Thu, 22 Jul 2021 21:53:16 +0000 (21:53 +0000)
commited8cbbc3ae96aef98d8f9e9e7003a99ed74992b5
tree45f7d4b0d7ab98665d3d5caa64ee461433fbd904
parentbc51e930274a5d5835ac8797978afc0864c9e30c
[release-branch.go1.16] runtime: don't clear timerModifiedEarliest if adjustTimers is 0

This avoids a race when a new timerModifiedEarlier timer is created by
a different goroutine.

For #47329
Fixes #47332

Change-Id: I6f6c87b4a9b5491b201c725c10bc98e23e0ed9d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/336432
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
(cherry picked from commit 798ec73519a7226d6d436e42498a54aed23b8468)
Reviewed-on: https://go-review.googlesource.com/c/go/+/336689
src/runtime/runtime2.go
src/runtime/time.go
src/time/sleep_test.go