[go-nuts] Can let an any, its typ type metadata and data value do not match?

2024-10-03 Thread 'qiu laidongfeng2' via golang-nuts
In #21031, this can be optimized to reduce the Pointer,usage atomic-operate for any type, as shown in https://go-review.googlesource.com/c/go/+/617695 . But we need support for setting atomic values to nil, and we also need a way to represent deleted values. The current practice is to make a

Re: [go-nuts] Does data race with only multiple goroutine parallel i=1 have an impact on the execution results?

2024-07-06 Thread 'qiu laidongfeng2' via golang-nuts
encounter that it is always output 1, so I ask. 在2024年7月6日星期六 UTC+8 22:20:57 写道: > On Sat, Jul 6, 2024 at 7:04 AM 'qiu laidongfeng2' via golang-nuts > wrote: > > > > Does data race in this program affect execution results? > > In amd64, it always output1. > >

[go-nuts] Does data race with only multiple goroutine parallel i=1 have an impact on the execution results?

2024-07-06 Thread 'qiu laidongfeng2' via golang-nuts
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 100 { wg.Add(1) go func() { defer wg.Done() i = 1 }() } wg.Wait() println(i) } ``` -- You received this message becaus