pub fn try_with_lock<T>(
root: &Path,
operation: impl FnOnce() -> Result<T>,
) -> Result<Option<T>>Expand description
Run operation holding the exclusive compaction lock if it is free.
Returns Ok(None) when the lock is held elsewhere. Never blocks.