3 ms·
There's a CompareAndSwap to do a quick acquire when there isn't contention: https://github.com/golang/go/blob/master/src/sync/mutex.go#L72 https://github.com/go
by jrockway 6y ago
There's a CompareAndSwap to do a quick acquire when there isn't contention: https://github.com/golang/go/blob/master/src/sync/mutex.go#L72 https://github.com/golang/go/blob/master/src/sync/mutex.go#L...
If you look at the slow path, there are many interesting paths that a lock can take in there. They are all potentially interesting when you're debugging contention.