MCPcopy Create free account
hub / github.com/CodeSentryAI/lockbud / std_mutex

Function std_mutex

toys/intra/src/main.rs:4–10  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2use parking_lot;
3
4fn std_mutex() {
5 let mu1 = sync::Mutex::new(1);
6 match *mu1.lock().ok().unwrap() {
7 1 => {},
8 _ => { *mu1.lock().unwrap() += 1; },
9 };
10}
11
12fn std_rwlock() -> i32 {
13 let rw1 = sync::RwLock::new(1);

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected