Commit a07ee41a authored by Caleb Martinez's avatar Caleb Martinez Committed by Ian Lance Taylor

time: add clarification to Timer.Stop documentation

Fixes #26220

Change-Id: I05703912be594d985ad3ccb3a9757ae21ec738ab
GitHub-Last-Rev: e4649847e015e573ee169c7d6db29b9437841afd
GitHub-Pull-Request: golang/go#26293
Reviewed-on: https://go-review.googlesource.com/122715Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 4b74506d
......@@ -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)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment