Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/jesseduffield/lazygit
/ NewThreadSafeMap
Function
NewThreadSafeMap
pkg/utils/thread_safe_map.go:11–15 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
9
}
10
11
func
NewThreadSafeMap[K comparable, V any]() *ThreadSafeMap[K, V] {
12
return
&ThreadSafeMap[K, V]{
13
innerMap: make(
map
[K]V),
14
}
15
}
16
17
func
(m *ThreadSafeMap[K, V]) Get(key K) (V, bool) {
18
m.mutex.RLock()
Callers
3
initialWindowViewNameMap
Function · 0.92
TestThreadSafeMap
Function · 0.85
TestThreadSafeMapConcurrentReadWrite
Function · 0.85
Calls
no outgoing calls
Tested by
2
TestThreadSafeMap
Function · 0.68
TestThreadSafeMapConcurrentReadWrite
Function · 0.68