remove incorrect comment about atomic safety

indeed the ival and fval can get updated separately, but such update
is always one or the other, not both.
This commit is contained in:
Not Rob Pike 2024-03-11 16:31:49 -07:00
parent f55a4e3265
commit afd6f33dcd
1 changed files with 0 additions and 1 deletions

View File

@ -209,7 +209,6 @@ func (c *counter) get() float64 {
if c.integerExposition {
return float64(ival % float64Mantissa)
}
// XXX atomics here are not strictly safe. ival and fval can be incremented elsewhere separately.
fval := math.Float64frombits(atomic.LoadUint64(&c.valBits))
return fval + float64(ival)
}