Golang, Software Performance, Concurrent Programming, Cache Coherence, Database Development.
*StripedMutex[T]) Get(i int) *T { return &l.locks[i%len(l.locks)].lock } We create a new struct to hold the T generic type and an unnamed variable of type cpu.CacheLinePad, which is a architecture-specific sized byte array. This makes sure that each lock is on it's own cacheline, meaning cores only