public void Options(RedisDistributedSynchronizationOptionsBuilder options)
        {
            if (this._preparedForHandleLost)
            {
                options.ExtensionCadence(TimeSpan.FromMilliseconds(30));
            }
            if (this._preparedForHandleAbandonment)
            {
                options.Expiry(TimeSpan.FromSeconds(.2))
                // the reader writer lock requires that the busy wait sleep time is shorter
                // than the expiry, so adjust for that
                .BusyWaitSleepTime(TimeSpan.FromSeconds(.01), TimeSpan.FromSeconds(.1));
            }

            this._options?.Invoke(options);
        }
Ejemplo n.º 2
0
 private static void RedisOptions(RedisDistributedSynchronizationOptionsBuilder options) =>
 options.Expiry(TimeSpan.FromSeconds(.5))     // short expiry for abandonment testing
 .BusyWaitSleepTime(TimeSpan.FromSeconds(.1), TimeSpan.FromSeconds(.3));