]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.14] runtime: don't panic on racy use of timers
authorIan Lance Taylor <iant@golang.org>
Wed, 26 Feb 2020 04:23:15 +0000 (20:23 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 27 Feb 2020 23:15:33 +0000 (23:15 +0000)
commit329317472fd3fbc3179523bd70e03e452c829846
tree7bf57dbacf417793162accf77b79bccedbe0542d
parent99f8de733936785d0e5c0d1271539d3f2f26d009
[release-branch.go1.14] runtime: don't panic on racy use of timers

If we see a racy use of timers, as in concurrent calls to Timer.Reset,
do the operations in an unpredictable order, rather than crashing.

Updates #37400
Updates #37449
Fixes #37494

Change-Id: Idbac295df2dfd551b6d762909d5040fc532c1b34
Reviewed-on: https://go-review.googlesource.com/c/go/+/221077
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
(cherry picked from commit 98858c438016bbafd161b502a148558987aa44d5)
Reviewed-on: https://go-review.googlesource.com/c/go/+/221298
src/runtime/time.go
src/time/time_test.go