Skip to main content

current_task

Function current_task 

Source
pub fn current_task(executor_id: u32) -> Option<(&'static TaskNode, u32)>
Expand description

The node currently being polled by an executor, with how long the poll has been running (ticks). None when the executor is idle/between polls, isn’t tracked, or the in-flight task isn’t a supervised node.

This is the raw “who is in-flight” primitive behind stalled_task. Note the single-executor blind spot: a task blocking this executor also blocks any observer task on it — run the observer on another (e.g. interrupt-priority) executor, or check from a pre-watchdog-reset path.