pub fn current_thread_id() -> Option<i32>Expand description
What:
The kernel’s number for the calling thread, which names its files under /proc/self/task/.
Why:
std does not expose it; the system call takes no arguments and cannot fail.
In TS you’d write (pseudocode):
const tid = threadId();