]> Cypherpunks repositories - gostls13.git/commitdiff
time: add clarification to Timer.Stop documentation
authorCaleb Martinez <accounts@calebmartinez.com>
Wed, 11 Jul 2018 13:40:14 +0000 (13:40 +0000)
committerIan Lance Taylor <iant@golang.org>
Wed, 11 Jul 2018 22:06:22 +0000 (22:06 +0000)
Fixes #26220

Change-Id: I05703912be594d985ad3ccb3a9757ae21ec738ab
GitHub-Last-Rev: e4649847e015e573ee169c7d6db29b9437841afd
GitHub-Pull-Request: golang/go#26293
Reviewed-on: https://go-review.googlesource.com/122715
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/time/tick.go

index 3d693206a532189305cecd7565b712d644319d65..e4cd43aa82aef5b6ec2de6542bbf5dfbd122bd25 100644 (file)
@@ -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)
 }