mirror of
https://github.com/vlang/v.git
synced 2025-08-03 09:47:15 -04:00
10 lines
231 B
V
10 lines
231 B
V
module sync
|
|
|
|
// Get current thread ID from Windows API (via C interface)
|
|
fn C.GetCurrentThreadId() u32
|
|
|
|
// thread_id returns a unique identifier for the caller thread.
|
|
pub fn thread_id() u64 {
|
|
return u64(C.GetCurrentThreadId())
|
|
}
|