Can you post the actual output from the race detector?

On Thursday, February 2, 2017 at 12:43:09 PM UTC-5, Aaron Wood wrote:
>
> Hi all,
>
> I'm seeing a very strange issue that I'm not quite sure how to fix:
>
> https://github.com/mesos/mesos-go/blob/next/backoff/backoff.go#L25
> https://github.com/mesos/mesos-go/blob/next/backoff/backoff.go#L80
>
> This causes a data race, and of course we only see it when running on a 
> beefy server with many cores :) I've never dealt with handling concurrency 
> and channels/selects when they're built dynamically using reflection. I've 
> tried surrounding the access on line 25 with a mutex but that does not 
> solve anything. Looking more into reflect.ValueOf() I see that it always 
> escapes to the heap as well as works with unsafe pointers in the 
> unpackEface() method 
> https://golang.org/src/reflect/value.go?s=61558:61591#L2073
>
> What is the proper way to handle the data race here?
>

-- 
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 more options, visit https://groups.google.com/d/optout.

Reply via email to