mirror of
https://github.com/golang/go
synced 2024-11-23 12:10:11 -07:00
time: add clarification to Timer.Stop documentation
Fixes #26220
Change-Id: I05703912be594d985ad3ccb3a9757ae21ec738ab
GitHub-Last-Rev: e4649847e0
GitHub-Pull-Request: golang/go#26293
Reviewed-on: https://go-review.googlesource.com/122715
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
4b74506da1
commit
a07ee41a33
@ -40,8 +40,8 @@ func NewTicker(d Duration) *Ticker {
|
||||
}
|
||||
|
||||
// Stop turns off a ticker. After Stop, no more ticks will be sent.
|
||||
// Stop does not close the channel, to prevent a read from the channel succeeding
|
||||
// incorrectly.
|
||||
// Stop does not close the channel, to prevent a concurrent goroutine
|
||||
// reading from the channel from seeing an erroneous "tick".
|
||||
func (t *Ticker) Stop() {
|
||||
stopTimer(&t.r)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user