MCPcopy Index your code
hub / github.com/RustPython/RustPython / release

Method release

crates/vm/src/stdlib/_thread.rs:138–144  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

136 #[pymethod]
137 #[pymethod(name = "release_lock")]
138 fn release(&self, vm: &VirtualMachine) -> PyResult<()> {
139 if !self.mu.is_locked() {
140 return Err(vm.new_runtime_error("release unlocked lock"));
141 }
142 unsafe { self.mu.unlock() };
143 Ok(())
144 }
145
146 #[cfg(unix)]
147 #[pymethod]

Callers 3

raw_writeMethod · 0.45
raw_readMethod · 0.45
__exit__Method · 0.45

Calls 3

is_lockedMethod · 0.80
ErrClass · 0.50
unlockMethod · 0.45

Tested by

no test coverage detected