silk.system.file_lock.
Exclusive advisory file locks released automatically with their owning handle.
Import as FileLock with import silk.system.file_lock { FileLock }.
Public declarations: 1.
FileLock#
pub struct FileLockOwns an exclusive advisory lock. Dropping it releases the lock; the lock file remains.
Implementation Drop for FileLock#
impl Drop for FileLockOperation drop#
fn drop(self: &mut Self) -> ()Implementation FileLock#
impl FileLockAssociated function exclusive#
pub effect fn exclusive(path: &Path) -> Self ! FileError | OutOfMemoryError ? &mut AllocatorCreates or opens the lock file and waits for its exclusive lock. The parent directory must exist. All participants must lock the same persistent file.
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, x86_64-pc-windows-msvc.