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

Function _fatal_error_c_thread

crates/stdlib/src/faulthandler.rs:1249–1261  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

suppress_crash_reportFunction · 0.85
spawnFunction · 0.50
sleepFunction · 0.50

Tested by

no test coverage detected