WithExpiry can be used to set the expiry of a mutex to the given value. The default is 8s.
(expiry time.Duration)
| 67 | // WithExpiry can be used to set the expiry of a mutex to the given value. |
| 68 | // The default is 8s. |
| 69 | func 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. |
searching dependent graphs…