std1.0.0-beta-7 SafeC docs

std :: thread

Function std::thread_create

#include <std/thread.h> source

generic<T> int thread_create(&unsigned long long tid, fn ?&T(?&T) func, ?&T arg)

Starts func(arg) on a new thread and stores its handle in *tid. 0 on success. func's return value is discarded (thread_join only waits). static ?&Job work(?&Job j) { ... return null; } unsigned long long tid = 0ULL; std::thread_create(&tid, work, (?&Job)&job);