std1.0.0-beta-7 SafeC docs

std :: thread

Struct std::SpawnedThread

#include <std/thread.h> source

generic<T, R> struct SpawnedThread { }

A running thread started by thread_spawn, and its result. A Drop value: join() it (or drop() it, which joins and drops the result).

Methods

§int started() constsource · definition

0 if the thread couldn't be created

§R join() consumesource · definition

waits; f's result (panics if it never started)

§void drop()source · definition

join() and drop the result