Re: [go-nuts] Question about data race

2017-01-19 Thread Ian Lance Taylor
On Thu, Jan 19, 2017 at 9:19 PM, xiaohai dai wrote: > > Thanks for your reply. > However, I don't think reading and writing w.last concurrently will lead to > data race. > In my opinion, concurrent writing to w.last may lead to data race, but > reading and writing concurrently here may not. > Look

Re: [go-nuts] Question about data race

2017-01-19 Thread xiaohai dai
Thanks for your reply. However, I don't think reading and writing w.last concurrently will lead to data race. In my opinion, concurrent writing to w.last may lead to data race, but reading and writing concurrently here may not. Look forward to your reply again. 在 2017年1月20日星期五 UTC+8下午1:03:07,Ian

Re: [go-nuts] Question about data race

2017-01-19 Thread Ian Lance Taylor
On Thu, Jan 19, 2017 at 7:05 PM, xiaohai dai wrote: > I am reading "Data Race Detector" from Godoc. > However, I'm confused by the example: Primitive unprotected variable > displayed in the post. I don't know why this example could lead to data > race. The assumption is that there is some other

[go-nuts] Question about data race

2017-01-19 Thread xiaohai dai
I am reading "Data Race Detector" from Godoc. However, I'm confused by the example: Primitive unprotected variable displayed in the post. I don't know why this example could lead to data race. Any help will be a