3 ms·
It's got a lot of gotchas and is not intended to be a simple replacement for map+mutex (certainly not in this case).
by geoka9 8y ago
It's got a lot of gotchas and is not intended to be a simple replacement for map+mutex (certainly not in this case).
- blaisio 8y agoActually, this is exactly a scenario in which a sync.Map would be useful. Typically, you would use pointers to atomic integers as the sync.Map values in a case like this.