MCPcopy Index your code
hub / github.com/go-redsync/redsync / WithFailFast

Function WithFailFast

redsync.go:145–149  ·  view source on GitHub ↗

WithFailFast can be used to quickly acquire and release the lock. When some Redis servers are blocking, we do not need to wait for responses from all the Redis servers response. As long as the quorum is met, we can assume the lock is acquired. The effect of this parameter is to achieve low latency,

(b bool)

Source from the content-addressed store, hash-verified

143// As long as the quorum is met, we can assume the lock is acquired. The effect of this parameter is to achieve low
144// latency, avoid Redis blocking causing Lock/Unlock to not return for a long time.
145func WithFailFast(b bool) Option {
146 return OptionFunc(func(m *Mutex) {
147 m.failFast = b
148 })
149}
150
151// WithShufflePools can be used to shuffle Redis pools to reduce centralized access in concurrent scenarios.
152func WithShufflePools(b bool) Option {

Callers

nothing calls this directly

Calls 1

OptionFuncFuncType · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…