pub fn with_lock<T>(host: &str, f: impl FnOnce() -> T) -> Result<T>
Run f while holding the fair lock for host.
f
host