Skip to main content

_stop_all_captures

Function _stop_all_captures 

Source
pub(crate) fn _stop_all_captures(py: Python<'_>)
Expand description

atexit sweep: stop and join every live capture and playback before interpreter shutdown, so no worker thread is still calling into Python during finalization.

Snapshots the two Weak registries into strong references (skipping any already dropped), then for each takes the lifecycle lock, sets the external stop before joining, and clears the tid — all with the GIL released. Registered on atexit from the module init.