()
| 1247 | |
| 1248 | #[pyfunction] |
| 1249 | fn _fatal_error_c_thread() { |
| 1250 | // This would call Py_FatalError in a new C thread |
| 1251 | // For RustPython, we just panic in a new thread |
| 1252 | #[cfg(not(target_arch = "wasm32"))] |
| 1253 | { |
| 1254 | suppress_crash_report(); |
| 1255 | std::thread::spawn(|| { |
| 1256 | panic!("Fatal Python error: in new thread"); |
| 1257 | }); |
| 1258 | // Wait a bit for the thread to panic |
| 1259 | std::thread::sleep(core::time::Duration::from_secs(1)); |
| 1260 | } |
| 1261 | } |
| 1262 | |
| 1263 | #[cfg(not(target_arch = "wasm32"))] |
| 1264 | fn suppress_crash_report() { |
nothing calls this directly
no test coverage detected