Skip to main content

current_thread_id

Function current_thread_id 

Source
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();