So  data race may occur in len(someChan) ? Channel len is volatile.

func reflect_chanlen(c *hchan) int {
        if c == nil {
                return 0
        }
        return int(c.qcount)
}

2016-06-27 11:58 GMT+08:00 Jan Mercl <0xj...@gmail.com>:

> On Mon, Jun 27, 2016 at 5:44 AM 苏沛 <sillyo...@gmail.com> wrote:
>
> Data race occurs when there are concurrent accesses to the same memory and
> at least one of them is a write. Channel capacity is never written to after
> a chan is created.
> --
>
> -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