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.
acquireopens or creates<profile>/afhttp-profile.lockand takes an exclusive advisory lock on it; the lock is released when the guard drops. - Lock
Status