(vm: &VirtualMachine)
| 414 | /// Acquires the global registry lock briefly, then reads each slot's exception atomically. |
| 415 | #[cfg(feature = "threading")] |
| 416 | pub fn get_all_current_exceptions(vm: &VirtualMachine) -> Vec<(u64, Option<PyBaseExceptionRef>)> { |
| 417 | let registry = vm.state.thread_frames.lock(); |
| 418 | registry |
| 419 | .iter() |
| 420 | .map(|(id, slot)| (*id, slot.exception.to_owned())) |
| 421 | .collect() |
| 422 | } |
| 423 | |
| 424 | /// Cleanup thread slot for the current thread. Called at thread exit. |
| 425 | #[cfg(feature = "threading")] |