[go-nuts] Re: Ignore stale read errors from the race detector

2022-06-10 Thread Jeff Learman
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:

Re: [go-nuts] Re: Ignore stale read errors from the race detector

2022-06-10 Thread Jeff Learman
Unlike C, Go has no `volatile` keyword. Therefore, the compiler is allowed to cache a value that is never updated in the scope that it sees, and there's no way for us to tell it not to do that. Issues like this aren't really data races, but they are caught by the race detector. On Wednesday,