pub fn lock_session(
root: &Path,
id: &str,
wait: Duration,
) -> Option<SessionLock>Expand description
Takes the lock of a session by creating {session_id}.lock exclusively, polling for up to
wait. None when the lock stays held, or the id or the folder is unusable. A lock file
older than the hook timeout belongs to a hook that died, and the next caller takes it over.