pub fn with_lock<T>(path: &Path, f: impl FnOnce() -> T) -> TExpand description
f, with the lock on path held: other threads and programs wait for it.
Where no lock can be taken (a folder not writable), f runs all the same:
writing it fails there anyway. Taken again by the thread holding it, it is
held already.