Skip to main content

Module process_lock

Module process_lock 

Source
Expand description

Process-held cross-platform file locks.

Functionsยง

create_new_lock_file
Creates a new lock file and fails if the path already exists.
lock_descriptor
Locks an immutable descriptor without locking its readable byte range on Windows. Closing the file releases the marker; callers must not call unlock for this lock.
lock_exclusive
Acquires an exclusive process-held lock, blocking until it becomes available.
lock_shared
Pins immutable data against cooperative exclusive eviction until the file closes.
open_existing_lock_file
Opens an existing lock file without creating a missing path.
open_lock_file
Opens or creates an owner-only lock file without truncating it.
try_lock_exclusive
Attempts to acquire an exclusive process-held lock without blocking.
unlock
Releases an exclusive process-held lock.