MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / get_file_locks

Function get_file_locks

crates/opencode-tool/src/tool.rs:19–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17 std::sync::OnceLock::new();
18
19fn get_file_locks() -> Arc<std::sync::Mutex<HashMap<String, Arc<Mutex<()>>>>> {
20 FILE_LOCKS
21 .get_or_init(|| Arc::new(std::sync::Mutex::new(HashMap::new())))
22 .clone()
23}
24
25pub async fn with_file_lock<F, Fut, T>(filepath: &str, f: F) -> T
26where

Callers 1

with_file_lockFunction · 0.85

Calls 2

newFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected