MCPcopy Create free account
hub / github.com/egonelbre/exp / Lock

Method Lock

sync2/mutex.go:15–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13}
14
15func (mu *Mutex) Lock() {
16 mu.mu.Lock()
17 atomic.StoreInt64(&mu.owner, runtime2.GOID())
18}
19
20func (mu *Mutex) Unlock() {
21 owner := mu.owner

Callers 3

testProgressFunction · 0.95
TestMutexOwnFunction · 0.95
TestMutexContentionFunction · 0.95

Calls 2

GOIDFunction · 0.92
LockMethod · 0.65

Tested by 3

testProgressFunction · 0.76
TestMutexOwnFunction · 0.76
TestMutexContentionFunction · 0.76