Skip to main content

is_shell_thread

Function is_shell_thread 

Source
pub fn is_shell_thread() -> bool
Expand description

True on the shell thread, false on every worker.

!!! WARNING: RUST-ONLY !!! C has one thread and needs no such test.

Sharp edge, same as errflag_cell’s: a thread deliberately named "main" by thread::Builder would be misclassified as the shell. Nothing in this tree does that.