Consider skipping specific tests when the race detector is active. Alternatively (and dangerously, unless you understand the consequences), provide two implementations; one that is safe and is used when race detection is enabled, and another that is unsafe, and use build flags to control it: testing - Can I skip a specific test when using the race detector? - Stack Overflow <https://stackoverflow.com/questions/34936571/can-i-skip-a-specific-test-when-using-the-race-detector>
On Monday, February 22, 2016 at 2:29:59 PM UTC-5 mikew...@gmail.com wrote: > > I've been trying to find a way to ignore errors from the golang race > detector. In particular I have a stats loop that does stale reads from for > a variable that is updated constantly. In this case I do not care if the > value of the read is stale and I do not want to use atomic operations or > locking to remove this race condition for performance reasons. Does anyone > know if there is a way to add something to the lines of code that read this > value to tell the race detector to ignore errors coming from a specific > line of code? > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/24dc2a17-2788-461e-b7d4-e201fc76a91bn%40googlegroups.com.