Function glib::thread_guard::thread_id

source ยท
pub fn thread_id() -> usize
Expand description

Returns a unique ID for the current thread.

Actual thread IDs can be reused by the OS once the old thread finished. This works around ambiguity created by ID reuse by using a separate TLS counter for threads.