Does data race in this program affect execution results?
In amd64, it always output1.
```go
package main
import "sync"
func main() {
i := 0
var wg sync.WaitGroup
for range 1000000 {
wg.Add(1)
go func() {
defer wg.Done()
i = 1
}()
}
wg.Wait()
println(i)
}
```
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/d7759c1a-e085-4b96-b464-892d668a7057n%40googlegroups.com.