pub unsafe fn spawn_thread(
stack_bytes: usize,
entry: extern "C" fn(*mut u8),
arg: *mut u8,
detached: bool,
) -> SysResult<Option<ThreadHandle>>Expand description
Spawns a new thread executing entry(arg) on a guarded stack.
ยงSafety
entry and arg must satisfy thread-safety invariants for the lifetime of the spawned thread.