Helper to cleanup callback data when unregistering Just removes from registry - Arc ensures memory stays alive if callback is running
(wait_handle: isize)
| 1790 | // Helper to cleanup callback data when unregistering |
| 1791 | // Just removes from registry - Arc ensures memory stays alive if callback is running |
| 1792 | fn cleanup_wait_callback_data(wait_handle: isize) { |
| 1793 | if let Ok(mut registry) = wait_callback_registry().lock() { |
| 1794 | // Removing from registry drops one Arc reference |
| 1795 | // If callback already ran, this frees the memory |
| 1796 | // If callback is still pending/running, it holds the other reference |
| 1797 | registry.remove(&wait_handle); |
| 1798 | } |
| 1799 | } |
| 1800 | |
| 1801 | #[pyfunction] |
| 1802 | fn UnregisterWait(wait_handle: isize, vm: &VirtualMachine) -> PyResult<()> { |
no test coverage detected