I've needed something similar. Its like a ManualResetEvent in C#, here is some test code and the struct I use:
https://play.golang.org/p/mvSMwMZX51 Note running that on playground will timeout due to everything being asleep, but this gets the idea across. On Sunday, September 4, 2016 at 4:29:11 PM UTC-7, Uvelichitel wrote: > > > On 09/05/2016 12:14 AM, Jason E. Aten wrote: > > > > Or perhaps it is because sync.WaitGroup and sync.Cond (condition > > variables) exist. They > > aren't select{}-friendly, but they usually do the job. > Yes they aren't select{}-friendly. sync.Cond for example looks like > right choice but just blocks. > -- 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.