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

Function write_thread_id

crates/stdlib/src/faulthandler.rs:217–225  ·  view source on GitHub ↗
(fd: i32, thread_id: u64, is_current: bool)

Source from the content-addressed store, hash-verified

215 // write_thread_id (traceback.c:1240-1256)
216 #[cfg(any(unix, windows))]
217 fn write_thread_id(fd: i32, thread_id: u64, is_current: bool) {
218 if is_current {
219 puts(fd, "Current thread ");
220 } else {
221 puts(fd, "Thread ");
222 }
223 dump_hexadecimal(fd, thread_id, core::mem::size_of::<usize>() * 2);
224 puts(fd, " (most recent call first):\n");
225 }
226
227 /// Dump the current thread's live frame chain to fd (signal-safe).
228 /// Walks the `Frame.previous` pointer chain starting from the

Callers 4

dump_all_threadsFunction · 0.85
watchdog_threadFunction · 0.85

Calls 2

putsFunction · 0.85
dump_hexadecimalFunction · 0.85

Tested by

no test coverage detected