]> Cypherpunks.ru repositories - gostls13.git/commitdiff
time: document that AfterFunc Timer's C field is nil
authorIan Lance Taylor <iant@golang.org>
Thu, 15 Jun 2023 23:56:45 +0000 (16:56 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 20 Jul 2023 23:18:18 +0000 (23:18 +0000)
Fixes #60811

Change-Id: Ica947a4789e71826284f9f6e41c298baa3d033e4
Reviewed-on: https://go-review.googlesource.com/c/go/+/503922
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>

src/time/sleep.go

index cdab4782ada3acb527d083e6a2ecc2d398cde119..0aec4cacc6bf93d624be8a5923ba942e4a3457fc 100644 (file)
@@ -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{