Jakob, I think you’re right. I am going to test this as soon as I am back home. After all I am a beginner in this area and it seems this one fooled me. I’ll send an update tomorrow. thanks - Chris
Jakob Borg <ja...@kastelo.net> schrieb am Sa. 19. Mai 2018 um 21:15: > On 19 May 2018, at 16:25, Chris Burkert <burkert.ch...@gmail.com> wrote: > > > > case <-time.After(5 * time.Second): > > fmt.Printf("Progress: %d left from %d\n", remaining, amount) > > It's not super clear from your post if you're aware of this already, but > this case will only fire after the select has been blocked for five > seconds. If there is any activity on the other cases one of those will > proceed, you'll get another loop iteration, and another five second timeout > before status output. > > Typically you'd use a five second ticker instead to get a channel event > every five seconds and use that to print status output. > > //jb -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.