Expand description
Per-session journal ownership lock.
Whoever holds a Runtime for session X holds an exclusive advisory
flock on <sessions_dir>/<id>.lock. Two runtimes for the same
journal are never allowed — the second caller gets an actionable error
pointing at the holder’s pid.
The lock is released on drop (or when the process dies — flock
semantics). Stale lock files from dead processes never block.
Structs§
- Lock
Holder - Body written into the lock file so the error message can name the holder.
- Session
Lock - Held for the runtime’s lifetime; dropping releases the
flock.
Enums§
Functions§
- lock_
path - Lock-file path for a session (for cleanup).
- sessions_
dir - The sessions directory (delegates to config).