Skip to main content

per_file_lock

Function per_file_lock 

Source
pub fn per_file_lock(path: &str) -> Arc<Mutex<()>> 
Expand description

Returns the shared advisory lock for path, creating it on first use.

The same path always yields the same Arc<Mutex<()>>, so callers across threads serialize on it. Different paths yield independent mutexes.