Expand description
Async task primitives: spawning concurrent tasks and yielding to the scheduler.
Structs§
- Cancelled
- Error returned by
JoinHandlewhen the task’s result was not collected before being dropped. - Join
Handle - Handle to a spawned task. Awaiting it returns the task’s output, or
Cancelledif the handle was dropped before the task completed.
Functions§
- spawn
- Spawns
futas a concurrent task, returning aJoinHandleto collect its result. - yield_
now - Yields control back to the runtime for one tick, allowing other tasks and I/O completions to be processed before this task resumes.