Function origin::current_thread_id

source ·
pub fn current_thread_id() -> Pid
Expand description

Return the current thread id.

This is the same as rustix::thread::gettid, but loads the value from a field in the runtime rather than making a system call.