Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/CodisLabs/codis
/ CompareAndSwap
Method
CompareAndSwap
pkg/utils/sync2/atomic2/bool.go:34–36 ·
view source on GitHub ↗
(o, n bool)
Source
from the content-addressed store, hash-verified
32
}
33
34
func
(b *Bool) CompareAndSwap(o, n bool) bool {
35
return
b.c.CompareAndSwap(b.toInt64(o), b.toInt64(n))
36
}
37
38
func
(b *Bool) Swap(v bool) bool {
39
return
b.c.Swap(b.toInt64(v)) != 0
Callers
2
KeepAlive
Method · 0.45
loopReader
Method · 0.45
Calls
1
toInt64
Method · 0.95
Tested by
no test coverage detected