I needed something similar to ManualResetEvent in C# here is what I'm using 
atm.

https://play.golang.org/p/UUyyK8ifku

This is attempting to be an edit, this example works better.

Also there is a helper method on the struct if don't want to wait forever 
Wait has a timeout option. Although there is more overhead on it.

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.

Reply via email to