Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ lock
Method
lock
crates/common/src/lock/cell_lock.rs:24–29 ·
view source on GitHub ↗
(&self)
Source
from the content-addressed store, hash-verified
22
23
#[inline]
24
fn lock(&self) {
25
if self.is_locked() {
26
deadlock(
""
,
"Mutex"
)
27
}
28
self.locked.set(true)
29
}
30
31
#[inline]
32
fn try_lock(&self) -> bool {
Callers
nothing calls this directly
Calls
3
deadlock
Function · 0.85
is_locked
Method · 0.80
set
Method · 0.45
Tested by
no test coverage detected