Skip to content
/ gettid Public

Helper to get an integer ID for the current thread

License

Notifications You must be signed in to change notification settings

jmgao/gettid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gettid

A 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);

About

Helper to get an integer ID for the current thread

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages