Skip to main content

Module lock

Module lock 

Source
Expand description

Advisory profile-directory locking via fs2::FileExt::try_lock_exclusive. The lockfile lives at <profile>/afhttp-profile.lock and is held for the lifetime of the Guard; release happens on Drop. The owner’s PID lives in a sibling file afhttp-profile.pid so we can rewrite it atomically (rename-over) without invalidating the fs2 lock identity.

Structs§

Guard
RAII guard around the profile lockfile. acquire opens or creates <profile>/afhttp-profile.lock and takes an exclusive advisory lock on it; the lock is released when the guard drops.
LockStatus

Functions§

probe
Returns true if profile_dir’s lockfile is currently held by another process.
status