You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fortunately, these are int64, so the easy solution is to use the atomic package, for example to add 1 to a variable, you simply do atomic.AddInt64(&npAllocs, 1).
The text was updated successfully, but these errors were encountered:
These statistic variables at the package scope are not atomic:
go-xmp/xmp/node.go
Line 27 in bbfd8f1
So I'm getting data races when processing multiple separate files concurrently, each in their own goroutine:
Fortunately, these are int64, so the easy solution is to use the
atomic
package, for example to add 1 to a variable, you simply doatomic.AddInt64(&npAllocs, 1)
.The text was updated successfully, but these errors were encountered: