Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
2
use parking_lot;
3
4
fn 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
12
fn std_rwlock() -> i32 {
13
let rw1 = sync::RwLock::new(1);
Callers
1
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected