News for hackers. Stuff that matters.
Re:In-memory key-value store in C, Go and Python by teejae on Wednesday March 21, 2012 @10:40AM (#3734580)
FYI, In the Go version, the lock can be added more simply, without the rw:

// Synchronize map access between multiple goroutines. type cache struct { m map[string]string sync.RWMutex }

Then, you can just use:

cache.Lock/Unlock/RLock/RUnlock directly. It's clearer. The beauty of Go's mixins.

There are no comments on this comment yet.