Expand description
Advisory file locking for multi-process access to a links database.
Uses the standard library’s std::fs::File advisory locks (flock
on Unix, LockFileEx on Windows). Locks are taken on a dedicated
sidecar *.lock file rather than on the database itself, so that the
lock survives operations that rewrite or remap the database file.
Advisory locks are held per open file description, which means two
FileLock values inside a single process contend exactly the same
way two separate processes do.
Structs§
- File
Lock - RAII guard around an advisory lock on a sidecar lock file.
Enums§
Functions§
- lock_
file_ path - Conventional sidecar lock filename for a links database.