Skip to main content

held_locks

Function held_locks 

Source
pub fn held_locks(dir: &Path) -> Vec<HeldLock>
Expand description

Which sessions in dir are locked by a live run.

A lock file left behind by a finished run is not a lock — the OS drops the flock with the process — so each file is probed with a non-blocking shared lock: it fails only while an exclusive holder exists, and it never creates a file or waits. A directory that does not exist holds nothing. On non-Unix targets there is no cross-process lock to ask about, and the answer is always empty.