Cmap is a concurrent map implementation.
Cmap allows a group of goroutines to manipulate a map without collision. It serializes access to the go-map using the github.com/clucia/choke library and serves as an example of its use.
To initialize a cmap:
cm := New(0)
You can then use:
cm.CompareUpdate(key, val, compVal)
cm.Range(cb func(key Key, val Val) error) - Iterate over the map calling callback func for each entry
CompareUpdate allows you to do a read-modify-write and guarantee atomicity.