os_thread_create :: fn (entry: OSThreadEntryFn, args: ...) OSThread
Create new thread and execute entry function with passed set of arguments.
Warning
Thread must be released by os_thread_join call.
entry Pointer to function started in new thread.
New thread.
// Worker function called from new thread. worker :: fn (args: []Any) { print("Thread started!\n"); os_sleep_ms(1000.0); } main :: fn () s32 { // Create and execute thread without parameters. t :: os_thread_create(&worker); // Wait for thread. os_thread_join(t); print("Thread joined.\n"); return 0; }
Declared in: docs.txt