On Wed, Sep 6, 2017 at 2:26 AM, T L <tapir....@gmail.com> wrote:
>
> I mean it can be viewed as a bug for inconsistency.
> But from the memory model view, it can also not be viewed as a bug.
>

It's not a bug. The code is clearly expecting some ordering between
internal operations within two goroutines, this is an incorrect
expectation because Go doesn't provide that kind of ordering.

In the line:
c <- *p

p can be deferenced at any time before the send and the send only has
to happen before the receive.

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