MCPcopy
hub / github.com/go-redsync/redsync / WithExpiry

Function WithExpiry

redsync.go:69–73  ·  view source on GitHub ↗

WithExpiry can be used to set the expiry of a mutex to the given value. The default is 8s.

(expiry time.Duration)

Source from the content-addressed store, hash-verified

67// WithExpiry can be used to set the expiry of a mutex to the given value.
68// The default is 8s.
69func WithExpiry(expiry time.Duration) Option {
70 return OptionFunc(func(m *Mutex) {
71 m.expiry = expiry
72 })
73}
74
75// WithTries can be used to set the number of times lock acquire is attempted.
76// The default value is 32.

Callers 2

TestValidFunction · 0.85
TestMutexLockUnlockSplitFunction · 0.85

Calls 1

OptionFuncFuncType · 0.85

Tested by 2

TestValidFunction · 0.68
TestMutexLockUnlockSplitFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…