Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/nats-io/nats.go
/ CompareAndSwap
Method
CompareAndSwap
internal/syncx/map.go:62–64 ·
view source on GitHub ↗
(key K, old, new V)
Source
from the content-addressed store, hash-verified
60
}
61
62
func
(m *Map[K, V]) CompareAndSwap(key K, old, new V) bool {
63
return
m.m.CompareAndSwap(key, old, new)
64
}
65
66
func
(m *Map[K, V]) CompareAndDelete(key K, value V) bool {
67
return
m.m.CompareAndDelete(key, value)
Callers
10
TestMapCompareAndSwap
Function · 0.80
Stop
Method · 0.80
Drain
Method · 0.80
Consume
Method · 0.80
Next
Method · 0.80
Stop
Method · 0.80
Drain
Method · 0.80
closeMsgs
Method · 0.80
Stop
Method · 0.80
Drain
Method · 0.80
Calls
no outgoing calls
Tested by
1
TestMapCompareAndSwap
Function · 0.64