(&self, vm: &VirtualMachine)
| 269 | |
| 270 | #[pymethod] |
| 271 | fn _release_save(&self, vm: &VirtualMachine) -> PyResult<(usize, u64)> { |
| 272 | if !self.mu.is_owned_by_current_thread() { |
| 273 | return Err(vm.new_runtime_error("cannot release un-acquired lock")); |
| 274 | } |
| 275 | let count = self.count.swap(0, core::sync::atomic::Ordering::Relaxed); |
| 276 | debug_assert!(count > 0, "RLock count underflow"); |
| 277 | unsafe { self.mu.unlock() }; |
| 278 | Ok((count, current_thread_id())) |
| 279 | } |
| 280 | |
| 281 | #[pymethod] |
| 282 | fn _acquire_restore(&self, state: PyTupleRef, vm: &VirtualMachine) -> PyResult<()> { |
nothing calls this directly
no test coverage detected