On Sat, Aug 20, 2016, 12:34 Konstantin Shaposhnikov <
k.shaposhni...@gmail.com> wrote:

> The code might be race free for the current Go implementation but I don't
> think this behaviour is documented.
>

It does not have to. There's no way to implement the documented behavior of
sync.Waitgroup such that it would not itself use and thus also provide
synchronization (aka the HB ordering).



> https://golang.org/ref/mem doesn't mention sync.WaitGroup at all. So
> wg.Done() doesn't necessarily happen before wg.Wait() returns and the
> effect of writing to "result" could be not visible after wg.Wait().
>

Such Waitgroup would be useless.

-- 

-j

-- 
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