pub fn gettid() -> Pid
gettid()—Returns the thread ID.
gettid()
This returns the OS thread ID, which is not necessarily the same as the rust::thread::Thread::id or the pthread ID.
rust::thread::Thread::id