Skip to main content

acquire_lock

Function acquire_lock 

Source
fn acquire_lock(
    lock_path: &Path,
    wait_timeout: Duration,
    stale_after: Duration,
) -> Result<InstallLock, Report>
Expand description

Acquires an exclusive lock file, retrying until timeout.

This prevents concurrent zebrad processes from racing archive downloads and replacing the same cached binary simultaneously.