MCPcopy
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
34func (b *Bool) CompareAndSwap(o, n bool) bool {
35 return b.c.CompareAndSwap(b.toInt64(o), b.toInt64(n))
36}
37
38func (b *Bool) Swap(v bool) bool {
39 return b.c.Swap(b.toInt64(v)) != 0

Callers 2

KeepAliveMethod · 0.45
loopReaderMethod · 0.45

Calls 1

toInt64Method · 0.95

Tested by

no test coverage detected