-j
Ok, thanks.If so, I want to announce the change that I've maid. It is regarding the rate limiting section [0].The wiki page states that when the created ticker is Stop-ed, the created goroutine will exit,which I think is not true, since the Ticker.Stop's documentation[1] states that Stop does notresult in Ticker.C being closed. A minimal example confirms my understanding and resultsin a panic due to deadlock.```gopackage mainimport ("sync""time")func main() {tick := time.NewTicker(time.Second)throttle := make(chan time.Time, 1)wg := sync.WaitGroup{}wg.Add(1)go func() {defer wg.Done()for t := range tick.C {select {case throttle <- t:default:}} // Wiki page says: exits after tick.Stop()}()tick.Stop()wg.Wait()}```The above code in the playground: https://play.golang.org/p/oWrcCa25ki.The diff can be viewed at [2].Cheers,Ivan
--Ivan Borshukov, bo0m...@gmail.com