mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
9 lines
231 B
V
9 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())
|
|
}
|