Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
15
func
(mu *Mutex) Lock() {
16
mu.mu.Lock()
17
atomic.StoreInt64(&mu.owner, runtime2.GOID())
18
}
19
20
func
(mu *Mutex) Unlock() {
21
owner := mu.owner
Callers
3
testProgress
Function · 0.95
TestMutexOwn
Function · 0.95
TestMutexContention
Function · 0.95
Calls
2
GOID
Function · 0.92
Lock
Method · 0.65
Tested by
3
testProgress
Function · 0.76
TestMutexOwn
Function · 0.76
TestMutexContention
Function · 0.76