Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
sync
/
thread_windows.c.v
9
lines
·
7
sloc
·
231 bytes
·
fcbe2e6ce77207e4d35b31cade9d6f1ecef55b5f
Raw
1
module
sync
2
3
// Get current thread ID from Windows API (via C interface)
4
fn
C.GetCurrentThreadId() u32
5
6
// thread_id returns a unique identifier for the caller thread.
7
pub
fn
thread_id() u64 {
8
return
u64(C.GetCurrentThreadId())
9
}
10