RedLock.net
RedLock.net is a C implementation of the Redlock distributed lock algorithm, designed for use with Redis. It leverages the StackExchange.Redis library and is distributed via NuGet. The library enables developers to coordinate access to shared resources across multiple processes or machines by ensuring only one process holds a given lock at any time. To use RedLock.net, developers create a RedLockFactory configured with multiple independent Redis endpoints, either by letting it manage its own connections or by reusing existing ConnectionMultiplexer instances. Locks are acquired by creating a RedLock object within a using block, and developers should verify that IsAcquired is true before proceeding with protected operations. The library supports both immediate acquisition and retry-based acquisition with configurable wait and retry intervals. RedLock.net handles automatic lock renewal through an internal timer and ensures locks expire after a specified duration if the holding process crashes. It also supports r