From: Ian Lance Taylor Date: Thu, 15 Jun 2023 23:56:45 +0000 (-0700) Subject: time: document that AfterFunc Timer's C field is nil X-Git-Tag: go1.22rc1~1568 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=16ec51471288f86d601efb9a2eb6b418cf634c16;p=gostls13.git time: document that AfterFunc Timer's C field is nil Fixes #60811 Change-Id: Ica947a4789e71826284f9f6e41c298baa3d033e4 Reviewed-on: https://go-review.googlesource.com/c/go/+/503922 TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui Run-TryBot: Ian Lance Taylor Reviewed-by: Michael Knyszek Auto-Submit: Ian Lance Taylor --- diff --git a/src/time/sleep.go b/src/time/sleep.go index cdab4782ad..0aec4cacc6 100644 --- a/src/time/sleep.go +++ b/src/time/sleep.go @@ -160,6 +160,7 @@ func After(d Duration) <-chan Time { // AfterFunc waits for the duration to elapse and then calls f // in its own goroutine. It returns a Timer that can // be used to cancel the call using its Stop method. +// The returned Timer's C field is not used and will be nil. func AfterFunc(d Duration, f func()) *Timer { t := &Timer{ r: runtimeTimer{