We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 437a819 commit f40c3d4Copy full SHA for f40c3d4
vm/src/stdlib/thread.rs
@@ -122,7 +122,7 @@ impl PyLock {
122
#[pymethod]
123
#[pymethod(name = "release_lock")]
124
fn release(&self, vm: &VirtualMachine) -> PyResult<()> {
125
- if self.mu.is_locked() {
+ if !self.mu.is_locked() {
126
return Err(vm.new_runtime_error("release unlocked lock".to_owned()));
127
}
128
unsafe { self.mu.unlock() };
@@ -183,7 +183,7 @@ impl PyRLock {
183
184
185
186
187
188
189
0 commit comments