Re: [go-nuts] Is it safe enough to read uint without lock/atomic operation?
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
[go-nuts] Is it safe enough to read uint without lock/atomic operation?
https://github.com/golang/go/blob/master/src/runtime/chan.go#L655 func reflect_chancap(c *hchan) int { if c == nil { return 0 } return int(c.dataqsiz) } -- 苏沛 -- You received this message because you are subscribed to the Google Groups "golang