std1.0.0-beta-7 SafeC docs

std :: thread

Function std::thread_spawn

#include <std/thread.h> source

generic<T: Send, R: Send> struct SpawnedThread<T, R> thread_spawn(fn R(T) f, T arg)

Runs f(arg) on a new thread. 'arg' moves into it (using it afterwards is an error); T and R must be Send.