Function wasmer_wasix::syscalls::wasi::thread_spawn::thread_spawn
source · pub fn thread_spawn<M: MemorySize>(
ctx: FunctionEnvMut<'_, WasiEnv>,
start_ptr: WasmPtr<ThreadStart<M>, M>,
) -> i32
Expand description
§thread_spawn()
Creates a new thread by spawning that shares the same memory address space, file handles and main event loops.
§Parameters
start_ptr
- Pointer to the structure that describes the thread to be launched
§Return
Returns the thread index of the newly created thread
(indices always start from the same value as pid
and increments in steps)