]> Cypherpunks repositories - gostls13.git/commit
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 02:37:10 +0000 (02:37 +0000)
commit98858c438016bbafd161b502a148558987aa44d5
tree978a84f4609297e98116e60a9b09d20342f9c27d
parentaf1f3b008281c61c54a5d203ffb69334b7af007c
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.

Fixes #37400

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>
src/runtime/time.go
src/time/time_test.go