a pointer value has the length of one machine word, so read/write operations should naturally be atomic. Can we just use pointer to a struct and concurrently access it as long as we don't change the thing the pointer points at?
type A struct{
x int
y int
z int
}
var v *A
func main(){
v = &A{}
go func(){
u := v
fmt.Print(u.x)
fmt.Print(u.y)
fmt.Print(u.z)
//will it only print 000 or 111?
}()
go func(){
u := &A{x:1, y:1, z:1}
v = u
}()
}