Skip to main content

Module executor

Module executor 

Source
Expand description

Priority-aware async executor with single-stack task polling.

All cooperative tasks share one system stack. The executor polls tasks in priority order. When a task returns Poll::Pending, its state lives in a static TaskCell referenced by the task’s TaskReg.user_data — no per-task stack allocation is needed.

When all tasks are pending, the executor calls port::arch::idle() to enter a low-power state.

Structs§

Executor
The global executor singleton.

Statics§

EXECUTOR
Global executor singleton.

Functions§

current_task
The identity of the task currently being polled. None if called outside of a task’s poll (e.g. from an ISR or before the executor starts).