Import with #import "std/thread_windows".
ThreadProcedure :: #type (argument: *void)WindowsThreadEntry :: #type (argument: *void) -> u32ThreadNotification :: struct { procedure: ThreadProcedure; argument: *void; }Thread :: struct { handle: usize; procedure: ThreadProcedure; argument: *void; notification: ThreadNotification; running: bool; finished: bool; }ThreadRun :: (argument: *void) -> u32ThreadStart :: (thread: *Thread, procedure: ThreadProcedure, argument: *void, notification: ThreadNotification) -> boolThe notification runs on this worker and must not join or restart it. _beginthreadex retains a waitable handle and releases C runtime thread storage when ThreadRun returns. The owner closes the handle after waiting.
ThreadRunning :: (thread: *Thread) -> boolThreadComplete :: (thread: *Thread, milliseconds: u32) -> boolThreadFinished :: (thread: *Thread) -> boolA zero-time wait checks the actual native thread exit and never waits for its procedure, notification, or TLS cleanup. Successful polling consumes the handle once and makes the record reusable.
ThreadWait :: (thread: *Thread)