gettid
A crate to help with fetching thread IDs across multiple platforms.
use gettid;
let main_tid = gettid;
let pid = id;
let thread_tid = spawn.join.unwrap;
assert_ne!;
gettidA crate to help with fetching thread IDs across multiple platforms.
use gettid::gettid;
let main_tid = gettid();
let pid = std::process::id();
let thread_tid = std::thread::spawn(gettid).join().unwrap();
assert_ne!(main_tid, thread_tid);