namespace: ashet.process.thread
Types
System Calls
syscall yield()Returns control to the scheduler. Returns when the scheduler schedules the process again.
syscall join(in _param0: Thread, out exit_code: ExitCode)Waits for the thread to exit and returns its return code.
syscall spawn(in function: ThreadFunction, in arg: ?anyptr, in stack_size: usize, out thread: Thread)Spawns a new thread with
spawn.functionpassingspawn.argto it. Ifspawn.stack_sizeis not 0, will create a stack with the given size.syscall kill(in target: Thread, in exit_code: ExitCode)Kills the given thread with
kill.exit_code.