[go-nuts] reflect.ValueOf thread safety

2017-02-27 Thread Dave Cheney
No, that's is not thread safe. The race detector will spot that. -- 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 golang-nuts+unsubscr...@googlegroups.com. For mo

[go-nuts] reflect.ValueOf thread safety

2017-02-27 Thread Gabriel Adumitrachioaiei
I wanted to ask if using reflect.ValueOf concurrently with some other code that makes changes in the memory the pointer references, is thread safe ? For example: type Test struct { name string } var x = &Test{name: "test"} go func() { reflect.ValueOf(&x).MethodByName("SomeMethod").Call(