Function wasix::thread_spawn

source ·
pub unsafe fn thread_spawn(args: *mut ThreadStart) -> Result<Tid, Errno>
Expand description

Creates a new thread by spawning that shares the same memory address space, file handles and main event loops. The web assembly process must export function named ‘wasi_thread_start’

Parameters

  • args - Pointer to the structure the describes the thread that is being spawened

Return

Returns the thread index of the newly created thread (indices always start from zero)