Expand description
Tasks — the unit the scheduler multiplexes.
A task is a small state machine: each poll advances it until it next wants
to block (on a channel, a select, or a timer), yield, spawn, or exit. The
scheduler drives poll, parks the task on blocking steps, and resumes it
(delivering any value) when the block clears. The interpreter and VM each
implement Task over their own continuation; the toy tasks in the tests
implement it by hand.
Structs§
Enums§
- Select
Arm - One arm of a
Select(Await the first of:). - Task
Step - What a task asks the scheduler to do after a
poll.
Traits§
- Task
- A schedulable unit of work.
'tties any spawned children to the lifetime of borrowed data the task closes over (e.g. the interpreter’s borrowed AST).