You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The standard approach is CancellationToken cancellationToken = default which is consistent with CancellationToken.None - i.e. a token that will never cancel. It seems that the default RedLockFactory implementation already is unncessarily implementing this logic by hand using a ?? null-coalescence operator, e.g.
Having this as part of the interface will poison-pill any other implementations of the interface as well as all call sites into this non-standard, non-idiomatic approach to cancellation tokens as well.
Just don't.
The text was updated successfully, but these errors were encountered:
The
IDistributedLockFactory
interface uses a non-standard approach where aCancellationToken?
typed parameter is assignednull
.RedLock.net/RedLockNet.Abstractions/IDistributedLockFactory.cs
Line 39 in dcfe373
The standard approach is
CancellationToken cancellationToken = default
which is consistent withCancellationToken.None
- i.e. a token that will never cancel. It seems that the defaultRedLockFactory
implementation already is unncessarily implementing this logic by hand using a??
null-coalescence operator, e.g.RedLock.net/RedLockNet.SERedis/RedLockFactory.cs
Line 130 in dcfe373
Having this as part of the interface will poison-pill any other implementations of the interface as well as all call sites into this non-standard, non-idiomatic approach to cancellation tokens as well.
Just don't.
The text was updated successfully, but these errors were encountered: