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

Function cleanup_wait_callback_data

crates/stdlib/src/overlapped.rs:1792–1799  ·  view source on GitHub ↗

Helper to cleanup callback data when unregistering Just removes from registry - Arc ensures memory stays alive if callback is running

(wait_handle: isize)

Source from the content-addressed store, hash-verified

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<()> {

Callers 2

UnregisterWaitFunction · 0.85
UnregisterWaitExFunction · 0.85

Calls 3

wait_callback_registryFunction · 0.85
lockMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected