Raw POSIX threads, under std::thread.
Types
Thread! | A running thread, to be joined once. |
Functions
spawn | Spawns an OS thread running entry(arg); join returns what entry returns. |
Function declarations
fn spawnsource
unsafe fn spawn(entry: unsafe fn(*u8) -> *u8, arg: *u8) -> Result[Thread!, i32] { ... }
Spawns an OS thread running entry(arg); join returns what entry returns. Caller: entry(arg) is a call whose obligations hold on the new thread, arg's pointee stays valid for as long as the new thread may use it, and every access to it from either thread is safe to interleave. This call establishes no synchronization. On failure, the errno: no thread ran, so entry was not called.