Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hjr265 committed Sep 10, 2023
1 parent 8d8c82b commit d232f14
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions redsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,10 @@ func WithValue(v string) Option {
})
}

// WithFailFast can be used to quickly acquire and release the locker.
// When some redis servers are blocking, we do not need to wait for all redis servers response. as long as the quorum is met, it will be returned immediately.
// The effect of this parameter is to achieve low latency, avoid redis blocking causing lock/unlock to not return for a long time.
// 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, avoid Redis blocking causing Lock/Unlock to not return for a long time.
func WithFailFast(b bool) Option {
return OptionFunc(func(m *Mutex) {
m.failFast = b
Expand Down

0 comments on commit d232f14

Please sign in to comment.