Skip to main content

lock_install

Function lock_install 

Source
pub fn lock_install(
    paths: &DataPaths,
    provider_id: &str,
    pinned_version: &str,
) -> Result<InstallGuard>
Expand description

Take the cross-instance install lock for dir when it is a shared dir. Blocks until any other instance’s install into the same dir finishes — call it from a blocking context (spawn_blocking). The lock file sits next to the dir and is never deleted (deleting a locked file races waiters onto a different inode; see registry::leases::CriticalSection).