Closed glycerine closed 5 years ago
I originally had it as Mut, but then it got confusing where the mutex was coming from -- because the CatMap is embedded in other structures the origin of the mutex was getting lost when calling in through those inheriting structs.
in densecatfeature.go:74 in particular...
https://github.com/lytics/CloudForest/pull/23/files#diff-e6bce0ff1df02a9f3541e95ad47641aeR74
good point @glycerine
Add sync.Lock() and sync.Unlock() around reads and writes to the CatMap. Also add full copying of the CatMap instead of sharing. That may reduce contention.
Fixes #20