Function wasix::thread_spawn
source · [−]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 ‘_start_thread’
Parameters
user_data- User data that will be supplied to the function when its calledstack_base- The base address of the stack allocated for this threadreactor- Indicates if the function will operate as a reactor or as a normal thread. Reactors will be repeatable called whenever IO work is available to be processed.
Return
Returns the thread index of the newly created thread (indices always start from zero)