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

Function WithValue

redsync.go:135–139  ·  view source on GitHub ↗

WithValue can be used to assign the random value without having to call lock. This allows the ownership of a lock to be "transferred" and allows the lock to be unlocked from elsewhere.

(v string)

Source from the content-addressed store, hash-verified

133// WithValue can be used to assign the random value without having to call lock.
134// This allows the ownership of a lock to be "transferred" and allows the lock to be unlocked from elsewhere.
135func WithValue(v string) Option {
136 return OptionFunc(func(m *Mutex) {
137 m.value = v
138 })
139}
140
141// WithFailFast can be used to quickly acquire and release the lock.
142// When some Redis servers are blocking, we do not need to wait for responses from all the Redis servers response.

Callers 1

TestMutexLockUnlockSplitFunction · 0.85

Calls 1

OptionFuncFuncType · 0.85

Tested by 1

TestMutexLockUnlockSplitFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…