release_redlock

Function release_redlock 

Source
pub async fn release_redlock<F, Fut>(
    try_release_fn: F,
    clients: &[RedisClient],
    acquire_results: &[bool],
) -> Result<(), LockError>
where F: Fn(&RedisClient) -> Fut + Send + Sync + Clone + 'static, Fut: Future<Output = Result<(), LockError>> + Send,
Expand description

Releases a lock using the RedLock algorithm across multiple Redis servers.

Attempts to release on all clients where the lock was acquired. Requires majority consensus for successful release (though release failures are generally non-fatal).

ยงArguments

  • try_release_fn - Function that attempts to release the lock on a single client
  • clients - List of Redis clients
  • acquire_results - Previous acquire results indicating which clients hold the lock