There is the comment in src/pkg/sync/atomic/race.go:
// We use runtime.RaceRead() inside of atomic operations to catch races
// between atomic and non-atomic operations. It will also catch races
// between Mutex.Lock() and mutex overwrite (mu = Mutex{}). Since we use
// only RaceRead() we won't catch races with non-atomic loads.
// Otherwise (if we use RaceWrite()) we will report races
// between atomic operations (false positives).
So the race detector doesn't catch races between atomic operations and non-atomic loads.
It should.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: