From: Caleb Martinez Date: Wed, 11 Jul 2018 13:40:14 +0000 (+0000) Subject: time: add clarification to Timer.Stop documentation X-Git-Tag: go1.11beta2~140 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a07ee41a334f6bbcda2e642e1d05d73c21bab746;p=gostls13.git 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/122715 Reviewed-by: Ian Lance Taylor --- diff --git a/src/time/tick.go b/src/time/tick.go index 3d693206a5..e4cd43aa82 100644 --- a/src/time/tick.go +++ b/src/time/tick.go @@ -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) }